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: onAuthStateChange #82

Merged
merged 2 commits into from
Nov 4, 2021
Merged

feat: onAuthStateChange #82

merged 2 commits into from
Nov 4, 2021

Conversation

wangsijie
Copy link
Contributor

Summary

Add support for an optional listener on authenticated state change

Testing

add test cases in index.test.ts

@IceHe
Copy link
Contributor

IceHe commented Nov 4, 2021

LGTM

Copy link
Contributor

@simeng-li simeng-li left a comment

Choose a reason for hiding this comment

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

open to discuss: One option is simply add a callback method, and let the consumer to decide whether call the client.isAuthed() to get the latest authenticated status?
Or one more option maybe instead of return the auth param hard code to true or false could return this.isAuth() keep the single source of truth?

@wangsijie wangsijie requested a review from simeng-li November 4, 2021 06:49
@wangsijie wangsijie merged commit e8dda56 into master Nov 4, 2021
@wangsijie wangsijie deleted the wangsijie--auth-changed branch November 4, 2021 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants