Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anonymous user APIs #576

Merged
merged 4 commits into from
May 15, 2020
Merged

Add anonymous user APIs #576

merged 4 commits into from
May 15, 2020

Conversation

kiootic
Copy link
Contributor

@kiootic kiootic commented May 8, 2020

No description provided.

@kiootic kiootic marked this pull request as ready for review May 11, 2020 07:52
@louischan-oursky louischan-oursky self-requested a review May 13, 2020 04:23
@louischan-oursky
Copy link
Contributor

The ID token still have identity and the SDK cannot decode it. (unknown identity type). We are going to remove the identity from ID token, right?

@kiootic
Copy link
Contributor Author

kiootic commented May 13, 2020

The ID token still have identity and the SDK cannot decode it. (unknown identity type). We are going to remove the identity from ID token, right?

I think so. We should update the existing issue (SkygearIO/skygear-server#1370) for planned breaking changes.

@kiootic
Copy link
Contributor Author

kiootic commented May 14, 2020

@louischan-oursky @carmenlau here is some sample code for testing RN SDK:

  const doAuth = useCallback(async () => {
    const {user} = await container.auth.authenticateAnonymously();
    console.log(user);
  }, []);

  const doPromote = useCallback(async () => {
    const result = await container.auth.promoteAnonymousUser({
      redirectURI: "rntest://callback"
    });
    console.log(result);
  }, []);

NOTE: for now please comment out the decodeIdentity calls to test it.

@louischan-oursky
Copy link
Contributor

It works fine on iOS simulator. I tested it with Android emulator Pixel 2 with API Level 29. It fails at a native method in SGSkygearReactNativeModule.java:187 with the root exception android.security.KeyStoreException: Incompatible padding mode. Any idea?

@kiootic
Copy link
Contributor Author

kiootic commented May 14, 2020

Strange, I remember fixing both this and the WritableMap issue before. Seems the changes somehow got lost. I'll fix it tomorrow then.

@louischan-oursky louischan-oursky merged commit 7b9b386 into SkygearIO:master May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants