Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

How to get CODE instead of TOKEN from AccountKit #26

Open
Eshpelin opened this issue May 9, 2019 · 0 comments
Open

How to get CODE instead of TOKEN from AccountKit #26

Eshpelin opened this issue May 9, 2019 · 0 comments

Comments

@Eshpelin
Copy link

Eshpelin commented May 9, 2019

Our App is currently implemented in Native Java - and uses the CODE returned by AccountKit in order to make further requests.

On Native Java (Android), here is how it works:

EITHER - the AccessToken Code you must Enable the Client Access Token Flow and set  new AccountKitConfiguration.AccountKitConfigurationBuilder(LoginType.PHONE, AccountKitActivity.ResponseType.TOKEN);

OR - the Authorization Code you must Disable the Client Access Token Flow and and set  new AccountKitConfiguration.AccountKitConfigurationBuilder(LoginType.PHONE, AccountKitActivity.ResponseType.CODE);

In our implementation, we need to use ResponseType.CODE in Java due to how the back-end is organized. This is currently implemented and working (without turning Enable Client Access Token Flow off in the backend.

Now, when it comes to AccountKit's Flutter Implementation by you, you mentioned here:

/// use [code] if the Enable Client Access Token Flow switch in your app's dashboard is OFF

But what happens when I turn off this:

image

Is that I face an error on my Flutter's End when logging in:

image

This means that unlike what you suggested (use CODE when this is turned OFF), I am actually facing an unknown error when this is turned off.

Any help regarding how we can get the CODE from the ResponseType would be much appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant