Skip to content

Failed since user is not authorized with Amplify singup

0

I'm new to aws congito , i made a simple code to sign up a user in android but upon trying , it throws an error saying Failed since user is not authorized , amplifyconfiguration.json file is already added and it has all information like poolID , AppClientId and so on , i need help to resolve this error thank you

Error : Failed since user is not authorized

Code :

 private fun signUpUser(email: String, password: String) {
        val options = AuthSignUpOptions.builder()
            .userAttribute(email(),email)
            .build()

        Amplify.Auth.signUp(email, password, options,
            { result: AuthSignUpResult? ->
                 Log.d("TAG","Success ${result!!.userId}")
            }, { error: AuthException? ->
                 Log.d("TAG",error!!.message!!)
            }
        )
    }
asked 3 years ago434 views
1 Answer
0

Hi, 2 sections of documentation will be highly useful in your case:

  1. Getting Started on Amplify auths with Cognito: https://docs.amplify.aws/lib/auth/getting-started/q/platform/js/
  2. https://docs.amplify.aws/cli/auth/groups/#create-user-groups which details auths to be given to user groups to gain access to your Amplify appl

Hope it helps! Didier

EXPERT
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.