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

isAnonymous property not present in sdk. #393

Open
andredev24 opened this issue Apr 18, 2020 · 1 comment
Open

isAnonymous property not present in sdk. #393

andredev24 opened this issue Apr 18, 2020 · 1 comment

Comments

@andredev24
Copy link

StitchAuth and StitchUser have a property called "isLoggedIn" that do the same thing, we have an app that should start as an anonymous user, I think that a property is needed to verify if the user authenticating is an anonymous user.

Here is a possible solution to verify that an anonymous user is authenticated.

export function isAnonUser() {
  // Check if there is currently a anonymous user
  return (
    StitchAppClient.auth.isLoggedIn &&
    StitchAppClient.auth.user?.loggedInProviderType === 'anon-user'
  );
}
@drewdipalma
Copy link

Hi Andres – Thanks for the suggestion, is there a reason that checking the loggedInProviderType doesn't work for your application or are you suggesting this as a potential extension for our SDK?

On way we keep track of how much users would like features like this is by posting/voting on our feedback forum .

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

No branches or pull requests

2 participants