okta/okta-react-native

Sign in not authorized

NatalieDinh opened this issue · 3 comments

Describe the bug?

I am having an issue using both the signIn and signInWithBrowser methods. When attemping to sign in, I receive a Error: Sign in not authorized with error code -1000.

My organization does not have any MFAs enabled, and we are sure that the credentials are accurate as we are able to get a access token through the OIDC debugger.

What is expected to happen?

We should be able to sign in and receive an access token in return.

What is the actual behavior?

I receive an Error: Sign in not authorized, -1000 error and no further action occurs. There is also no further description as to what the specific issue is.

Reproduction Steps?

On my custom login page, I have this useEffect to create the config on render.

  useEffect(() => {
    const configCreator = async () => {
      await createConfig({
        clientId: configFile.oidc.clientId,
        redirectUri: configFile.oidc.redirectUri,
        endSessionRedirectUri: configFile.oidc.endSessionRedirectUri,
        discoveryUri: configFile.oidc.discoveryUri,
        scopes: configFile.oidc.scopes,
        requireHardwareBackedKeyStore:
          configFile.oidc.requireHardwareBackedKeyStore,
      });
      await isAuthenticated();
    };
    configCreator();
  }, []);

Then when the user fills out the email/password fields. I submit the credentials using

const login = async (email, pass) => {
     await signIn({username: email, password: pass}
           .then((token) => console.log(token))
           .catch((error) => {
                  console.log(error.detail.status);
            });
}

I have also tried it using this repo which also results in the same error.

In order to run the repo above:
1. After cloning, enter the custom-sign-in directory
2. Perform npm install
3. Perform cd ios && pod install && cd ..
4. Run npm run ios
5. Attempt to log in

Additional Information?

No response

SDK Version

SDK Version: 2.7.0

Build Information

No response

@NatalieDinh How where you able to solve this? Im assuming MFA was on?

@gebrown43 No, as mentioned above, MFA was not enabled. I honestly just ran through the set up flow again, and also enabled and then disabled Client Secret which fixed it.

@NatalieDinh Ok thanks for the quick response