-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
iOS: UI Freezes on Canceling Sign-In via In-App Browser with Amplify #13191
Comments
Hello, @canrollas and sorry to hear you're experiencing this issue. Couple of questions to clarify to see if we can reproduce this issue on our side and root cause the problem.
|
Hello @cwomack thanks for your reply, {
"name": "sw_5100_sentagroandroid",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@aws-amplify/auth": "^6.0.23",
"@aws-amplify/core": "^6.0.23",
"@aws-amplify/react-native": "^1.0.24",
"@aws-amplify/rtn-web-browser": "^1.0.24",
"@aws-sdk/client-cognito-identity-provider": "^3.540.0",
"@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "9.3.10",
"@react-native-picker/picker": "2.4.10",
"@react-navigation/bottom-tabs": "^6.5.20",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@rneui/base": "^4.0.0-rc.7",
"@rneui/themed": "^4.0.0-rc.8",
"@rnmapbox/maps": "^10.1.19",
"aws-amplify": "^6.0.23",
"eas": "^0.1.0",
"expo": "^49.0.23",
"expo-apple-authentication": "~6.1.0",
"expo-auth-session": "^5.4.0",
"expo-build-properties": "~0.8.3",
"expo-constants": "~14.4.2",
"expo-dev-client": "~2.4.13",
"expo-device": "~5.4.0",
"expo-font": "~11.4.0",
"expo-location": "~16.1.0",
"expo-notifications": "~0.20.1",
"expo-secure-store": "~12.3.1",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"expo-web-browser": "~12.3.2",
"punycode": "^2.3.1",
"react": "18.2.0",
"react-native": "0.72.10",
"react-native-animated-weather-icons": "^1.0.4",
"react-native-charts-wrapper": "^0.6.0",
"react-native-device-info": "^10.13.1",
"react-native-gesture-handler": "~2.12.0",
"react-native-get-random-values": "~1.9.0",
"react-native-picker-select": "^9.0.1",
"react-native-reanimated": "~3.3.0",
"react-native-reanimated-table": "^0.0.2",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-svg": "13.9.0",
"react-native-table-component": "^1.2.2",
"react-native-vector-icons": "^10.0.3",
"react-native-webview": "^13.8.4",
"typescript": "^5.4.3",
"weather-icons-react": "^1.2.0"
},
"devDependencies": {
"@babel/core": "^7.24.3",
"@types/react-native-table-component": "^1.2.8",
"react-native-svg-transformer": "^1.3.0"
},
"private": true
}
I believe that problem is on this file and lines : packages/auth/src/providers/cognito/utils/oauth/completeOAuthFlow.ts Moreover for developer team I have a suggestion to fix in total : In react native apps you can create an env that is basically aligned around the endpoints of cognito to accept issued tokens from the Oauth clients such as described in the StackOverflow post but currently if you fix browser issue that is fair enough too : https://stackoverflow.com/questions/78242578/integrating-sign-in-with-apple-into-react-native-app-with-aws-cognito-authentica |
Hello @cwomack When I check your source code : oAuthStore.storeOAuthInFlight(false); Inside of the signInWithRedirect.ts when I change it to false code started to work. SO I am creating a pull request to fix it platform based : if (Platform.OS === 'ios') {
oAuthStore.storeOAuthInFlight(false); // This is the first step of the OAuth flow so we are not in flight
} else {
oAuthStore.storeOAuthInFlight(true); // This is the first step of the OAuth flow so we are not in flight
} |
@canrollas, the fix has been released in the latest version (6.0.26), please validate it address the concern. Thank you. |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify CLI
Environment information
Describe the bug
I've encountered a UI freeze issue on the iOS platform within my application when a user attempts to sign in using an in-app browser (presumably through AWS Amplify's authentication flow). Specifically, if the user decides to cancel the sign-in process, all UI elements related to Amplify (e.g., sign-in buttons) become unresponsive. The user is unable to interact with these elements again unless the app is completely removed and reinstalled.
Expected behavior
The user should be able to cancel the sign-in process and interact with the app normally afterward, including the ability to initiate the sign-in process again if desired.
Reproduction steps
Code Snippet
Log output
The text was updated successfully, but these errors were encountered: