-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Auth0 #782
Comments
Hello, new to jhipster ! I was trying to do the setup of app following here https://deploy-preview-1024--okta-blog.netlify.app/blog/2022/06/15/react-native-spring-boot Right now I am getting some 401 error from axios, is there an community help channel where I can ask for help ? Also looking into this doc https://github.com/jhipster/generator-jhipster-react-native/blob/main/docs/oauth2-oidc.md#log-out-from-the-identity-provider-iosandroid isn't logout disabled by default ? |
I've tested this blueprint with Keycloak and Okta and successfully logged out. Auth0 does not work for logout because their I hope to try and bring this library up-to-date in the next few weeks if time allows. |
As far as a community help channel, this is the best spot to get help. |
Yeah project is using expo 42 which is not supported in the expo go app, I had too upgrade to expo 44 just to make it work. |
I'm happy to review and merge and PRs you contribute! If you have time, of course. 😊 |
I realised my mistake, I had to do coming to the other part, it looks like I am also able to logout without any issue. VID_20220828203154.mp4 |
Yes, it does look like you can log out from the app. However, does it log out from Auth0 too? If you click login again, does it prompt you for credentials, or does it just log you right in? |
Yes, it is asking for credentials again. |
Cool! I'll give it a try this week. |
@ThakurKarthik See the PR that fixes this issue to see what I had to do to make logout work with Auth0. |
How did you upgrade to Expo 44? I've succeeded in getting it to work with web and iOS, but login fails on Android. |
Hello I think I followed this guide for upgrade https://blog.expo.dev/expo-sdk-44-4c4b8306584a |
I tried using the instructions from that guide:
Then I tried
I tried adding the module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
'react-native-reanimated/plugin',
]
};
}; Suggestion found here. Then, I cleared my cache with
Since I ran
Did you experience anything like this? |
If I open Android Studio and monitor the logs, this is what I see before the error:
|
Yes I had to add the reanimated plugin to babel.config file, I followed the same SO link :) I also removed the expo cache and It ran without issue. One thing I noticed is if you make this value to false for android platform I was getting the same Login dismiss log message. Apart from this I had to turn off the remote debugging for the app otherwise it was not loading at all. This is the local changes for my package.json file diff --git a/package.json b/package.json
index 7a898d4..96f0a5f 100644
--- a/package.json
+++ b/package.json
@@ -59,41 +59,41 @@
"dependencies": {
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
- "@react-native-community/datetimepicker": "3.5.2",
+ "@react-native-community/datetimepicker": "4.0.0",
"@react-native-masked-view/masked-view": "0.2.6",
- "@react-native-picker/picker": "1.16.1",
+ "@react-native-picker/picker": "2.2.1",
"@react-navigation/devtools": "6.0.4",
"@react-navigation/drawer": "5.12.5",
"@react-navigation/native": "5.9.4",
"@react-navigation/stack": "5.14.5",
"apisauce": "2.1.2",
- "expo": "~42.0.1",
- "expo-auth-session": "~3.2.3",
- "expo-constants": "~11.0.1",
- "expo-linking": "~2.3.1",
- "expo-random": "~11.1.2",
- "expo-splash-screen": "~0.11.2",
- "expo-status-bar": "~1.0.4",
- "expo-web-browser": "~9.1.0",
+ "expo": "^44.0.0",
+ "expo-auth-session": "~3.5.0",
+ "expo-constants": "~13.0.1",
+ "expo-linking": "~3.0.0",
+ "expo-random": "~12.1.1",
+ "expo-splash-screen": "~0.14.1",
+ "expo-status-bar": "~1.2.0",
+ "expo-web-browser": "~10.1.0",
"format-json": "1.0.3",
"formik": "2.2.9",
"identity-obj-proxy": "3.0.0",
"lodash": "4.17.21",
"querystringify": "2.2.0",
"ramda": "0.27.1",
- "react": "16.13.1",
+ "react": "17.0.1",
"react-datepicker": "4.3.0",
- "react-dom": "16.13.1",
- "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
- "react-native-gesture-handler": "~1.10.2",
+ "react-dom": "17.0.1",
+ "react-native": "0.64.3",
+ "react-native-gesture-handler": "~2.1.0",
"react-native-keyboard-aware-scroll-view": "0.9.4",
"react-native-modal-datetime-picker": "13.0.0",
"react-native-picker-select": "8.0.4",
- "react-native-reanimated": "~2.2.0",
- "react-native-safe-area-context": "3.2.0",
- "react-native-screens": "~3.4.0",
+ "react-native-reanimated": "~2.3.1",
+ "react-native-safe-area-context": "3.3.2",
+ "react-native-screens": "~3.10.1",
"react-native-sectioned-multi-select": "0.8.1",
- "react-native-web": "^0.14.13",
+ "react-native-web": "0.17.1",
"react-redux": "7.2.6",
"redux": "4.1.2",
"redux-persist": "6.0.0",
@@ -103,14 +103,14 @@
"yup": "0.32.11"
},
"devDependencies": {
- "@babel/core": "^7.9.0",
- "@expo/webpack-config": "^0.12.63",
+ "@babel/core": "^7.12.9",
+ "@expo/webpack-config": "~0.16.2",
"@react-native-community/eslint-config": "3.0.1",
"@storybook/addons": "5.3.21",
"@storybook/react-native": "5.3.25",
"@storybook/theming": "5.3.21",
- "@types/react": "~16.9.35",
- "@types/react-native": "~0.63.2",
+ "@types/react": "~17.0.21",
+ "@types/react-native": "~0.64.12",
"babel-jest": "27.4.2",
"babel-preset-env": "1.7.0",
"buffer": "6.0.3",
@@ -121,8 +121,8 @@
"eslint-plugin-prettier": "4.0.0",
"expect": "26.6.2",
"generator-jhipster-react-native": "4.2.5",
- "jest": "26.6.3",
- "jest-expo": "^42.0.0",
+ "jest": "^26.6.3",
+ "jest-expo": "^44.0.0",
"lint-staged": "12.1.2",
"mockery": "2.1.0",
"patch-package": "6.4.7",
@@ -132,7 +132,7 @@
"resolve": "1.20.0",
"rimraf": "3.0.2",
"tapable": "2.2.1",
- "typescript": "4.4.4"
+ "typescript": "~4.3.5"
},
"engines": {
"node": ">=12.x", |
I am not that familiar with the situation but if a clean db command exists, that should be run I guess. |
@mraible : approved |
Describe the bug
Currently, this blueprint mostly works with Auth0. However, logout does not work.
Instructions To reproduce
This blog post shows how to reproduce. There's a section at the bottom with a possible solution.
JHipster app's
.yo-rc.json
https://github.com/oktadev/auth0-full-stack-java-example/blob/main/.yo-rc.json
Entity JDL or JSON files
https://github.com/oktadev/auth0-full-stack-java-example/blob/main/flickr2.jdl
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: