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

Use new checkSession #27

Merged
merged 2 commits into from
Jun 4, 2020
Merged

Use new checkSession #27

merged 2 commits into from
Jun 4, 2020

Conversation

adamjmcgrath
Copy link
Contributor

@adamjmcgrath adamjmcgrath commented Jun 2, 2020

Description

Use the new checkSession method from spa js, which checks the is.authenticated cookie and swallows recoverable errors.

References

auth0/auth0-spa-js#482

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@adamjmcgrath adamjmcgrath added the small This PR may require low effort to action, or contains few changes to review label Jun 2, 2020
@adamjmcgrath adamjmcgrath requested a review from a team June 2, 2020 16:41
expect(result.current.isAuthenticated).toBe(true);
expect(result.current.user).toBe('__test_user__');
});

it('should handle login_required errors when getting token', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

SPA JS now handles this logic

@adamjmcgrath adamjmcgrath merged commit 3a51082 into master Jun 4, 2020
@adamjmcgrath adamjmcgrath deleted the check-session branch June 4, 2020 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small This PR may require low effort to action, or contains few changes to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants