aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.44k stars 2.13k forks source link

Auth.federatedSignIn returns success but no user session #8638

Closed marcolino closed 3 years ago

marcolino commented 3 years ago

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

Authentication

Amplify Categories

auth

Environment information

``` System: OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa) CPU: (4) x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz Memory: 125.69 MB / 7.62 GB Container: Yes Shell: 5.0.17 - /usr/bin/bash Binaries: Node: 12.16.3 - /usr/local/bin/node Yarn: 1.19.1 - /usr/bin/yarn npm: 7.20.0 - /usr/local/bin/npm Browsers: Chrome: 92.0.4515.107 Firefox: 87.0 npmPackages: @babel/core: 7.14.6 => 7.14.6 (7.12.17, 7.12.3) @babel/preset-env: ^7.14.7 => 7.14.7 (7.12.17, 7.12.1) @material-ui/core: ^4.12.1 => 4.12.1 @material-ui/icons: ^4.11.2 => 4.11.2 @testing-library/jest-dom: ^5.11.4 => 5.14.1 @testing-library/react: ^11.1.0 => 11.2.7 @testing-library/user-event: ^12.1.10 => 12.8.3 aws-amplify: ^4.2.0 => 4.2.0 gatsby-starter-default: 1.0.0 lighthouse: ^8.1.0 => 8.1.0 react: ^17.0.2 => 17.0.2 react-cookie-consent: ^6.2.4 => 6.2.4 react-dom: ^17.0.2 => 17.0.2 react-gravatar: ^2.6.3 => 2.6.3 react-loader-spinner: ^4.0.0 => 4.0.0 react-promise-tracker: ^2.1.0 => 2.1.0 react-router-dom: ^5.2.0 => 5.2.0 react-router-sitemap: ^1.2.0 => 1.2.0 react-scripts: 4.0.3 => 4.0.3 react-toastify: ^7.0.4 => 7.0.4 sitemap: ^7.0.0 => 7.0.0 (1.13.0) web-vitals: ^0.2.4 => 0.2.4 workbox-background-sync: ^5.1.3 => 5.1.4 workbox-broadcast-update: ^5.1.3 => 5.1.4 workbox-cacheable-response: ^5.1.3 => 5.1.4 workbox-core: ^5.1.3 => 5.1.4 workbox-expiration: ^5.1.3 => 5.1.4 workbox-google-analytics: ^5.1.3 => 5.1.4 workbox-navigation-preload: ^5.1.3 => 5.1.4 workbox-precaching: ^5.1.3 => 5.1.4 workbox-range-requests: ^5.1.3 => 5.1.4 workbox-routing: ^5.1.3 => 5.1.4 workbox-strategies: ^5.1.3 => 5.1.4 workbox-streams: ^5.1.3 => 5.1.4 npmGlobalPackages: babel-cli: 6.26.0 create-react-app: 4.0.3 eslint: 7.21.0 html-minifier: 4.0.0 n: 7.0.0 npm: 7.20.0 serverless: 2.28.7 ```

Describe the bug

Auth.federatedSignIn returns correctly (after asking for user permission in the oauth window), but the cred payload is undefined.

Using Auth.signIn works just fine, and I get the user credentials and details in the then payload, as expected.

I call Amplify.configure() this way:

``` Amplify.configure({ Auth: { oauth: { domain: "sistemisolari.auth.eu-west-1.amazoncognito.com", scope: ["phone", "email", "profile", "openid"], responseType: "code", // or "token", note that REFRESH token will only be generated when the responseType is code redirectSignIn: isLocalhost ? "http://localhost:3000/oauth2" : "https://sistemisolari.auth.eu-west-1.amazoncognito.com/oauth2/authorize", redirectSignOut: isLocalhost ? "http://localhost:3000/" : "https://quiccasa.sistemisolari.com/", }, region: process.env.REACT_APP_REGION, userPoolId: process.env.REACT_APP_USER_POOL_ID, userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID, storage: localStorage, }, }); ```

and Auth.federatedSignIn() this way:

``` Auth.federatedSignIn( { provider: "Google" } ).then(cred => { console.log('cred:', cred); // => undefined }).catch(e => { console.log('error:', e); }); ```

I get into the federatedSignIn callback, with an undefined cred.

I did also try to listen on Hub (which too works for email/password logins), with no success.

I did also set window.LOG_LEVEL = 'DEBUG', so I include the DEBUG logs:

``` 16:47:25.321 [DEBUG] 47:25.321 Amplify - amplify config Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.324 [DEBUG] 47:25.325 I18n - configure I18n ConsoleLogger.ts:115 16:47:25.328 [DEBUG] 47:25.328 I18n - create I18n instance ConsoleLogger.ts:115 16:47:25.329 [DEBUG] 47:25.329 AuthClass - configure Auth ConsoleLogger.ts:115 16:47:25.329 [DEBUG] 47:25.330 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.331 [DEBUG] 47:25.332 Hub - Dispatching to auth with Object { event: "parsingCallbackUrl", data: {…}, message: "The callback url is being parsed" } ConsoleLogger.ts:125 16:47:25.333 [DEBUG] 47:25.334 Hub - Dispatching to auth with Object { event: "parsingCallbackUrl", data: {…}, message: "The callback url is being parsed" } ConsoleLogger.ts:125 16:47:25.335 [DEBUG] 47:25.335 AnalyticsClass - on hub capsule auth Object { event: "parsingCallbackUrl", data: {…}, message: "The callback url is being parsed" } ConsoleLogger.ts:125 16:47:25.337 [DEBUG] 47:25.337 Hub - Dispatching to auth with Object { event: "configured", data: null, message: "The Auth category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.338 [DEBUG] 47:25.339 Hub - Dispatching to auth with Object { event: "configured", data: null, message: "The Auth category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.339 [DEBUG] 47:25.340 AnalyticsClass - on hub capsule auth Object { event: "configured", data: null, message: "The Auth category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.340 [DEBUG] 47:25.341 AnalyticsClass - configure Analytics Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.341 [DEBUG] 47:25.342 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.342 [DEBUG] 47:25.343 AWSPinpointProvider - configure Analytics Object { disabled: undefined, autoSessionRecord: true, Auth: {…} } ConsoleLogger.ts:125 16:47:25.344 [DEBUG] 47:25.344 Hub - Dispatching to analytics with Object { event: "configured", data: null, message: "The Analytics category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.345 [DEBUG] 47:25.345 AnalyticsClass - on hub capsule analytics Object { event: "configured", data: null, message: "The Analytics category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.346 [DEBUG] 47:25.347 AnalyticsClass - current configuration Object { autoSessionRecord: true, Auth: {…} } ConsoleLogger.ts:125 16:47:25.347 [DEBUG] 47:25.348 Storage - storage configure called ConsoleLogger.ts:115 16:47:25.348 [DEBUG] 47:25.349 StorageClass - configure Storage ConsoleLogger.ts:115 16:47:25.349 [DEBUG] 47:25.350 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.351 [DEBUG] 47:25.352 AWSS3Provider - configure Storage undefined ConsoleLogger.ts:125 16:47:25.352 [DEBUG] 47:25.352 Storage - storage vault configure called ConsoleLogger.ts:115 16:47:25.352 [DEBUG] 47:25.353 StorageClass - configure Storage ConsoleLogger.ts:115 16:47:25.353 [DEBUG] 47:25.353 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.353 [DEBUG] 47:25.354 AWSS3Provider - configure Storage undefined ConsoleLogger.ts:125 16:47:25.354 [DEBUG] 47:25.354 RestAPI - configure Rest API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.355 [DEBUG] 47:25.355 RestAPI - create Rest API instance ConsoleLogger.ts:115 16:47:25.356 [DEBUG] 47:25.357 RestClient - API Options Object { endpoints: [], Auth: {…} } ConsoleLogger.ts:125 16:47:25.358 [DEBUG] 47:25.358 PubSub - configure PubSub Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.359 [DEBUG] 47:25.359 GraphQLAPI - configure GraphQL API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.362 [DEBUG] 47:25.362 GraphQLAPI - create Rest instance ConsoleLogger.ts:115 16:47:25.362 [DEBUG] 47:25.363 RestClient - API Options Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.363 [DEBUG] 47:25.364 RestAPI - configure Rest API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.364 [DEBUG] 47:25.365 RestAPI - create Rest API instance ConsoleLogger.ts:115 16:47:25.365 [DEBUG] 47:25.366 RestClient - API Options Object { endpoints: [], Auth: {…} } ConsoleLogger.ts:125 16:47:25.367 [DEBUG] 47:25.368 GraphQLAPI - configure GraphQL API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.368 [DEBUG] 47:25.369 GraphQLAPI - create Rest instance ConsoleLogger.ts:115 16:47:25.369 [DEBUG] 47:25.369 RestClient - API Options Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.370 [DEBUG] 47:25.370 Interactions - configure Interactions Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.371 [DEBUG] 47:25.372 XR - configure XR Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.372 [DEBUG] 47:25.372 AbstractXRProvider - configure SumerianProvider Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.372 [DEBUG] 47:25.373 Predictions - configure Predictions Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.375 [DEBUG] 47:25.376 AuthClass - getting current authenticated user ConsoleLogger.ts:115 16:47:25.400 [DEBUG] 47:25.400 AuthClass - get current authenticated userpool user ConsoleLogger.ts:115 16:47:25.401 [DEBUG] 47:25.402 AuthClass - Failed to get user from user pool ConsoleLogger.ts:115 16:47:25.402 [DEBUG] 47:25.403 AuthClass - The user is not authenticated by the error No current user ConsoleLogger.ts:125 ```

Expected behavior

I'd expect to get the authenticated user info, like I get with Auth.signIn()

Reproduction steps

Proceed with a basic aws-amplify setup; I did follow this post: agnita-authentication-for-create-react-app-using-aws-cognito.

Code Snippet

Please ask me for any additional code that can be useful to solve the issue, I'll be glad to share it...

Log output

``` 16:47:25.321 [DEBUG] 47:25.321 Amplify - amplify config Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.324 [DEBUG] 47:25.325 I18n - configure I18n ConsoleLogger.ts:115 16:47:25.328 [DEBUG] 47:25.328 I18n - create I18n instance ConsoleLogger.ts:115 16:47:25.329 [DEBUG] 47:25.329 AuthClass - configure Auth ConsoleLogger.ts:115 16:47:25.329 [DEBUG] 47:25.330 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.331 [DEBUG] 47:25.332 Hub - Dispatching to auth with Object { event: "parsingCallbackUrl", data: {…}, message: "The callback url is being parsed" } ConsoleLogger.ts:125 16:47:25.333 [DEBUG] 47:25.334 Hub - Dispatching to auth with Object { event: "parsingCallbackUrl", data: {…}, message: "The callback url is being parsed" } ConsoleLogger.ts:125 16:47:25.335 [DEBUG] 47:25.335 AnalyticsClass - on hub capsule auth Object { event: "parsingCallbackUrl", data: {…}, message: "The callback url is being parsed" } ConsoleLogger.ts:125 16:47:25.337 [DEBUG] 47:25.337 Hub - Dispatching to auth with Object { event: "configured", data: null, message: "The Auth category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.338 [DEBUG] 47:25.339 Hub - Dispatching to auth with Object { event: "configured", data: null, message: "The Auth category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.339 [DEBUG] 47:25.340 AnalyticsClass - on hub capsule auth Object { event: "configured", data: null, message: "The Auth category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.340 [DEBUG] 47:25.341 AnalyticsClass - configure Analytics Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.341 [DEBUG] 47:25.342 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.342 [DEBUG] 47:25.343 AWSPinpointProvider - configure Analytics Object { disabled: undefined, autoSessionRecord: true, Auth: {…} } ConsoleLogger.ts:125 16:47:25.344 [DEBUG] 47:25.344 Hub - Dispatching to analytics with Object { event: "configured", data: null, message: "The Analytics category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.345 [DEBUG] 47:25.345 AnalyticsClass - on hub capsule analytics Object { event: "configured", data: null, message: "The Analytics category has been configured successfully" } ConsoleLogger.ts:125 16:47:25.346 [DEBUG] 47:25.347 AnalyticsClass - current configuration Object { autoSessionRecord: true, Auth: {…} } ConsoleLogger.ts:125 16:47:25.347 [DEBUG] 47:25.348 Storage - storage configure called ConsoleLogger.ts:115 16:47:25.348 [DEBUG] 47:25.349 StorageClass - configure Storage ConsoleLogger.ts:115 16:47:25.349 [DEBUG] 47:25.350 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.351 [DEBUG] 47:25.352 AWSS3Provider - configure Storage undefined ConsoleLogger.ts:125 16:47:25.352 [DEBUG] 47:25.352 Storage - storage vault configure called ConsoleLogger.ts:115 16:47:25.352 [DEBUG] 47:25.353 StorageClass - configure Storage ConsoleLogger.ts:115 16:47:25.353 [DEBUG] 47:25.353 Parser - parse config Array(3) [ {…}, "to amplifyconfig", {…} ] ConsoleLogger.ts:125 16:47:25.353 [DEBUG] 47:25.354 AWSS3Provider - configure Storage undefined ConsoleLogger.ts:125 16:47:25.354 [DEBUG] 47:25.354 RestAPI - configure Rest API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.355 [DEBUG] 47:25.355 RestAPI - create Rest API instance ConsoleLogger.ts:115 16:47:25.356 [DEBUG] 47:25.357 RestClient - API Options Object { endpoints: [], Auth: {…} } ConsoleLogger.ts:125 16:47:25.358 [DEBUG] 47:25.358 PubSub - configure PubSub Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.359 [DEBUG] 47:25.359 GraphQLAPI - configure GraphQL API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.362 [DEBUG] 47:25.362 GraphQLAPI - create Rest instance ConsoleLogger.ts:115 16:47:25.362 [DEBUG] 47:25.363 RestClient - API Options Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.363 [DEBUG] 47:25.364 RestAPI - configure Rest API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.364 [DEBUG] 47:25.365 RestAPI - create Rest API instance ConsoleLogger.ts:115 16:47:25.365 [DEBUG] 47:25.366 RestClient - API Options Object { endpoints: [], Auth: {…} } ConsoleLogger.ts:125 16:47:25.367 [DEBUG] 47:25.368 GraphQLAPI - configure GraphQL API Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.368 [DEBUG] 47:25.369 GraphQLAPI - create Rest instance ConsoleLogger.ts:115 16:47:25.369 [DEBUG] 47:25.369 RestClient - API Options Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.370 [DEBUG] 47:25.370 Interactions - configure Interactions Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.371 [DEBUG] 47:25.372 XR - configure XR Object { opt: {…} } ConsoleLogger.ts:125 16:47:25.372 [DEBUG] 47:25.372 AbstractXRProvider - configure SumerianProvider Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.372 [DEBUG] 47:25.373 Predictions - configure Predictions Object { Auth: {…} } ConsoleLogger.ts:125 16:47:25.375 [DEBUG] 47:25.376 AuthClass - getting current authenticated user ConsoleLogger.ts:115 16:47:25.400 [DEBUG] 47:25.400 AuthClass - get current authenticated userpool user ConsoleLogger.ts:115 16:47:25.401 [DEBUG] 47:25.402 AuthClass - Failed to get user from user pool ConsoleLogger.ts:115 16:47:25.402 [DEBUG] 47:25.403 AuthClass - The user is not authenticated by the error No current user ConsoleLogger.ts:125 ```

aws-exports.js

No response

Manual configuration

```js { Auth: { oauth: { domain: "sistemisolari.auth.eu-west-1.amazoncognito.com", scope: ["phone", "email", "profile", "openid"], responseType: "code", // or "token", note that REFRESH token will only be generated when the responseType is code redirectSignIn: isLocalhost ? "http://localhost:3000/oauth2" : "https://sistemisolari.auth.eu-west-1.amazoncognito.com/oauth2/authorize", redirectSignOut: isLocalhost ? "http://localhost:3000/" : "https://quiccasa.sistemisolari.com/", }, region: process.env.REACT_APP_REGION, userPoolId: process.env.REACT_APP_USER_POOL_ID, userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID, storage: localStorage, }, }; ```

Additional configuration

$ aws cognito-idp describe-user-pool --user-pool-id eu-west-1_edKzSSeU9

```json { "UserPool": { "EmailVerificationSubject": "Il codice di verifica", "MfaConfiguration": "OFF", "LambdaConfig": {}, "SmsAuthenticationMessage": "Il codice di autenticazione è {####}. ", "CreationDate": 1624546149.868, "VerificationMessageTemplate": { "EmailSubject": "Il codice di verifica", "SmsMessage": "Il codice di verifica è {####}. ", "DefaultEmailOption": "CONFIRM_WITH_CODE", "EmailMessage": "Il codice di verifica è {####}. " }, "SmsVerificationMessage": "Il codice di verifica è {####}. ", "Policies": { "PasswordPolicy": { "RequireLowercase": true, "MinimumLength": 8, "RequireUppercase": true, "RequireSymbols": true, "RequireNumbers": true } }, "Id": "eu-west-1_edKzSSeU9", "LastModifiedDate": 1625556418.488, "SchemaAttributes": [ { "Mutable": false, "StringAttributeConstraints": { "MinLength": "1", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "sub", "Required": true }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "name", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "given_name", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "family_name", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "middle_name", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "nickname", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "preferred_username", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "profile", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "picture", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "website", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "email", "Required": true }, { "DeveloperOnlyAttribute": false, "AttributeDataType": "Boolean", "Required": false, "Name": "email_verified", "Mutable": true }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "gender", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "10", "MaxLength": "10" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "birthdate", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "zoneinfo", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "locale", "Required": false }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "phone_number", "Required": false }, { "DeveloperOnlyAttribute": false, "AttributeDataType": "Boolean", "Required": false, "Name": "phone_number_verified", "Mutable": true }, { "Mutable": true, "StringAttributeConstraints": { "MinLength": "0", "MaxLength": "2048" }, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "address", "Required": false }, { "Mutable": true, "DeveloperOnlyAttribute": false, "AttributeDataType": "Number", "Name": "updated_at", "NumberAttributeConstraints": { "MinValue": "0" }, "Required": false }, { "Mutable": true, "StringAttributeConstraints": {}, "DeveloperOnlyAttribute": false, "AttributeDataType": "String", "Name": "identities", "Required": false } ], "Arn": "arn:aws:cognito-idp:eu-west-1:520892676263:userpool/eu-west-1_edKzSSeU9", "AdminCreateUserConfig": { "InviteMessageTemplate": { "EmailSubject": "La tua password temporanea", "SMSMessage": "Il nome utente è {username} e la password temporanea è {####}. ", "EmailMessage": "Il nome utente è {username} e la password temporanea è {####}. " }, "AllowAdminCreateUserOnly": false, "UnusedAccountValidityDays": 7 }, "AutoVerifiedAttributes": [ "email" ], "EmailVerificationMessage": "Il codice di verifica è {####}. ", "UserPoolTags": {}, "EstimatedNumberOfUsers": 45, "Domain": "sistemisolari", "Name": "Agnita", "EmailConfiguration": {} } } ```

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

marcolino commented 3 years ago

I could solve myself at last... :-) It was simply the redirect to home, when landed on /oauth2, that destroyed the auth in localstorage... Now I setup oauth redirect_uri to https://example.com/, instead of https://example.com/oauth2... :-) Sorry, everybody.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.