Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

changes for #259 #614

Merged
merged 2 commits into from
Jul 27, 2020
Merged

changes for #259 #614

merged 2 commits into from
Jul 27, 2020

Conversation

phongnt
Copy link
Collaborator

@phongnt phongnt commented Jul 27, 2020

@phongnt phongnt requested a review from callmekatootie July 27, 2020 13:42
Copy link
Collaborator

@callmekatootie callmekatootie left a comment

Choose a reason for hiding this comment

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

@phongnt

  • So, your solution only checks at the time of org selection which is not really useful, because at that time, the browser is able to detect if the user is logged in or not (even without your code)

  • The expectation here is that, if a user has two or more tabs open, and in both the tabs, the user has gone past the org selection stage and has logged out from one of the tabs, in the other tabs, if the user attempts to do any action that requires an api call, we detect that they user has logged out and redirect them to the login page - which your solution does not support

This ticket seems to suggest an approach - auth0/auth0-spa-js#392 but not sure if the solution provided is exactly what we are looking for... The problem is the same but we may have to adapt the solution to fit our needs...

@phongnt
Copy link
Collaborator Author

phongnt commented Jul 27, 2020

@callmekatootie I added more code to check authenticated when call API. Your provided solution is not work because getTokenSilently() still work although already logged out in another tab.

Copy link
Collaborator

@callmekatootie callmekatootie left a comment

Choose a reason for hiding this comment

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

Thanks for the quick turnaround

@callmekatootie callmekatootie merged commit fc1076d into develop Jul 27, 2020
@callmekatootie callmekatootie deleted the issue-259 branch July 27, 2020 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants