amplify-js: Aws Amplify Won't stay signed in
Before opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
# Put output below this line
System:
OS: macOS 12.0.1
CPU: (8) arm64 Apple M1
Memory: 138.02 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.17.0 - /usr/local/bin/node
npm: 9.1.2 - ~/lbnapp_new/node_modules/.bin/npm
Browsers:
Chrome: 108.0.5359.98
Safari: 15.1
npmPackages:
@angular/cli: ^15.0.1 => 15.0.1
@babel/core: ^7.18.6 => 7.20.5 (7.9.0)
@expo/config-plugins: ^5.0.0 => 5.0.4
@expo/webpack-config: ^0.17.0 => 0.17.3
@react-native-async-storage/async-storage: ~1.17.3 => 1.17.11
@react-native-community/netinfo: 9.3.0 => 9.3.0
@react-native-picker/picker: 2.4.2 => 2.4.2
@react-navigation/bottom-tabs: ^6.5.0 => 6.5.0
@react-navigation/native: ^6.0.12 => 6.0.16
@react-navigation/native-stack: ^6.8.0 => 6.9.4
HelloWorld: 0.0.1
amazon-cognito-identity-js: ^5.2.10 => 5.2.12
aws-amplify: ^4.3.33 => 4.3.43
aws-amplify-react-native: ^6.0.8 => 6.0.8
dependencies: ^0.0.1 => 0.0.1
expo: ^46.0.16 => 46.0.17
expo-clipboard: ~3.1.0 => 3.1.0
expo-image-picker: ~13.3.1 => 13.3.1
expo-splash-screen: ~0.16.2 => 0.16.2
expo-status-bar: ~1.4.0 => 1.4.2
expo-updates: ~0.14.7 => 0.14.7
gradle: ^1.2.4 => 1.2.4
graphql: ^16.6.0 => 16.6.0 (15.8.0)
hermes-inspector-msggen: 1.0.0
ini: ^1.3.5 => 1.3.8 (3.0.1)
inquirer: ^6.5.1 => 6.5.2 (8.2.4)
install: ^0.13.0 => 0.13.0
npm: ^9.1.2 => 9.1.2
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-hook-form: ^7.37.0 => 7.39.7
react-live-clock: ^6.0.6 => 6.1.0
react-native: 0.69.6 => 0.69.6
react-native-get-random-values: ~1.8.0 => 1.8.0
react-native-really-awesome-button: ^2.0.3 => 2.0.3
react-native-safe-area-context: 4.3.1 => 4.3.1
react-native-screens: ~3.15.0 => 3.15.0
react-native-web: ~0.18.7 => 0.18.10
react-native-webview: 11.23.0 => 11.23.0
uuid: ^9.0.0 => 9.0.0 (3.4.0, 3.3.2, 8.3.2, 7.0.2, 7.0.3)
whatwg-fetch: ^2.0.4 => 2.0.4 (3.6.2)
npmGlobalPackages:
@angular/cli: 15.0.1
@aws-amplify/cli: 10.5.1
@react-native-picker/picker: 2.4.8
eas-cli: 2.8.0
expo-cli: 6.0.8
gradle: 1.2.4
ios-deploy: 1.11.4
n: 9.0.0
npm: 9.1.3
react-native-cli: 2.0.1
searchable-flatlist: 0.0.4
tls-test: 1.0.0
yarn: 1.22.19
Describe the bug
User gets signed in succesfully, but on refreshing page or closing app the user gets signed out. If I run log authuser = await Auth.currentAuthenticatedUser({bypassCache :true}), i get an error that the user is not authenticated. Running on expo react native.
Expected behavior
Was expecting the user to stay signed in, and not get signed out on closing the app or refreshing
Reproduction steps
Unsure how to reproduce, seems to only be an error with my system.
Code Snippet
// Put your code below this line.
Log output
// Put your logs below this line
aws-exports.js
/* eslint-disable */
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = {
"aws_project_region": "us-west-1",
"aws_cognito_identity_pool_id": "us-west-1:c5ca7116-4e3c-4119-bac9-840c558ccde5",
"aws_cognito_region": "us-west-1",
"aws_user_pools_id": "us-west-1_KyYUYtU9h",
"aws_user_pools_web_client_id": "70lpo834a3snibile7ksa4jp99",
"oauth": {},
"aws_cognito_username_attributes": [],
"aws_cognito_social_providers": [],
"aws_cognito_signup_attributes": [
"NAME",
"EMAIL"
],
"aws_cognito_mfa_configuration": "OFF",
"aws_cognito_mfa_types": [
"SMS"
],
"aws_cognito_password_protection_settings": {
"passwordPolicyMinLength": 7,
"passwordPolicyCharacters": []
},
"aws_cognito_verification_mechanisms": [
"EMAIL"
],
"aws_appsync_graphqlEndpoint": "https://uzg65om2zndhtnwfa4qwnrgc7a.appsync-api.us-west-1.amazonaws.com/graphql",
"aws_appsync_region": "us-west-1",
"aws_appsync_authenticationType": "API_KEY",
"aws_appsync_apiKey": "da2-zydyqxmcrnhojctvdnuijbaata",
"aws_user_files_s3_bucket": "socialmediaapp-storage-8135690111043-staging",
"aws_user_files_s3_bucket_region": "us-west-1"
};
export default awsmobile;
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (10 by maintainers)
no problem, you’ve been more helpful than 99% of people I’ve came across