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

Check if user is already logged in idp #1461

Open
lufo88ita opened this issue Jan 21, 2025 · 0 comments
Open

Check if user is already logged in idp #1461

lufo88ita opened this issue Jan 21, 2025 · 0 comments

Comments

@lufo88ita
Copy link

lufo88ita commented Jan 21, 2025

Hi all,
Thanks for the library. It's straightforward 👍

I need an advise to how to check if a user is already logged in another domain of the same identity provider. I know there is
"loadDiscoveryDocumentAndTryLogin", but that's not what I need, because I don't want to redirect the user to the login form if he is not authenticated.

Example 1:
I login in app1.example.
I access to app2.example. I want to show in the top left of the page "Hi, "

Example 2:
I do not login in any site.
I access to app2.example. I want to show in the top left of the page "Hi, guest! Login to get the full experience"

I read this issue:
#1030
but the refresh token is not set.

Tell me if I don't make myself clear :-)

Regards,

EDIT:
I also try to invoke
oauthService.loadDiscoveryDocument()
And then manually call tryLogin with two callback (loginerror, tokenreceived), but they are not triggered. TryLogin return always true, regardless the user is logged on the identity provider or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant