Skip to content

Can Cognito Endpoint be changed without invalidating tokens? #3109

@ndeka28

Description

@ndeka28

We've been using the default endpont for our Cognito user pool but would like to start using a custom proxy endpoint (without changing the underlying pool). Also we want to remove credential provider config.

When updating an Amplify Android app's Config to:

  1. Change the Cognito User Pool endpoint to a custom domain, and
  2. Remove the Credentials Provider configuration,

existing signed-in users are automatically logged out at app launch.

Existing Config

                "CognitoUserPool": {
                    "Default": {
                        "PoolId": "eu-west-XXX",
                        "AppClientId": "xxxx",
                        "Region": "eu-west-1"
                    }
                },
                "CredentialsProvider": {
                    "CognitoIdentity": {
                        "Default": {
                            "PoolId": "eu-west-XXX",
                            "Region": "eu-west-1"
                        }
                    }
                },

New config we are aiming for

             "CognitoUserPool": {
                    "Default": {
                        "Endpoint": "idp.example.com",
                        "PoolId": "eu-west-1_**",
                        "AppClientId": "XXXX",
                        "Region": "eu-west-1"
                    }
                },

Recently Amplify-iOS SDK has similar issues, raised by our team members and it get resolved in a newer version 2.49.1

Here is Amplify-iOS similar issue link - aws-amplify/amplify-swift#4008 and here is the link to the fix - https://github.com/aws-amplify/amplify-swift/pull/4010/files#diff-c2bd9521d0dc38e3ddd27c89e7efadcfbf6450d05b80ecdfb1ee386ce140b1d3

Can Android SDK has similar approach or any other workaround, so that we can release our new changes?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions