-
Notifications
You must be signed in to change notification settings - Fork 585
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
Double Login Tests #6294
Double Login Tests #6294
Conversation
* I wanted to ensure the double login tests would pass for realm-react. * Everything works as they should and now we have a basic UserProvider test.
console.log("testing results: ", { | ||
id, | ||
currentId: realmApp?.currentUser?.id, | ||
refreshToken, | ||
currentRefreshToken: realmApp?.currentUser?.refreshToken, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("testing results: ", { | |
id, | |
currentId: realmApp?.currentUser?.id, | |
refreshToken, | |
currentRefreshToken: realmApp?.currentUser?.refreshToken, | |
}); |
|
||
useEffect(() => { | ||
if (isUserRegistered && !result.pending && result.operation !== AuthOperationName.LogInWithEmailPassword) { | ||
console.log("logging in user"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("logging in user"); |
|
||
useEffect(() => { | ||
if (result.success && result.operation === AuthOperationName.Register) { | ||
console.log("user registered"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("user registered"); |
|
||
useEffect(() => { | ||
if (!isUserRegistered && !result.pending && result.operation !== AuthOperationName.Register) { | ||
console.log("registering user"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("registering user"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't want to remove the console.log
statements, you could use the debug
package instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice getting these underway 🥳 🙏
d3bf5c6
to
3c61eff
Compare
What, How & Why?
To the reviewer
☑️ ToDos
Compatibility
label is updated or copied from previous entryCOMPATIBILITY.md
package.json
s (if updating internal packages)Breaking
label has been applied or is not necessary