Do we need to parse hash? isn't calling checkSession enough?

Hi
I might be missing something but it seems that it is not required to parse hash in SPA app and it is enough to call checkSession(), which we need to call anyway on page load (when refreshed)

Am I right?

Hello, @kormik - welcome to the Auth0 Community!

parseHash is meant to capture the initial authentication response. The idea for an SPA is that you should not be refreshing it, so parseHash captures the authentication request sent back to the callback, and logs the user in without refreshing the page.

By calling checkSession, you check if there is an existing session in Auth0, and perform a Silent Authentication, so that the user is not hassled in going to Auth0 again and logging in… again.

Let me know if this helps resolve your question.

Thanks!