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

feat(gotrue): Add signInAnonymously() method #883

Merged
merged 28 commits into from
Apr 9, 2024
Merged

Conversation

dshukertjr
Copy link
Member

@dshukertjr dshukertjr commented Apr 5, 2024

What kind of change does this PR introduce?

Adds signInAnonymously() method to support Anonymous sign-in.

This PR should be merged after #879

Closes #874

// ignore 404s since user might not exist anymore
if (error.statusCode != '401' && error.statusCode != '404') {
if (error.statusCode != '401' &&
error.statusCode != '403' &&
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This edit has been made, because for deleted users on the latest Supabase auth server, the following error is returned:
AuthException(message: User from sub claim in JWT does not exist, statusCode: 403)

@dshukertjr dshukertjr marked this pull request as ready for review April 9, 2024 09:17
@@ -80,6 +80,14 @@ void main() {
);
});

test('anonymous sign-in', () async {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add a check to the test that the user anonymous is.

@dshukertjr dshukertjr merged commit 2e63613 into main Apr 9, 2024
9 checks passed
@dshukertjr dshukertjr deleted the feat/anonymous branch April 9, 2024 10:01
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.

[auth] Add support for signInAnonymously()
2 participants