Angular-auth-oidc-client: QUESTION: Is there some way to check if user is authorized on Identity Server?

Created on 11 Jul 2018  路  6Comments  路  Source: damienbod/angular-auth-oidc-client

Is there way to check authorization on Identity Server (IS) from angular client app? I want to auto login users only in case if they are authorized on IS. Otherwize I want to show them some welcome text and button which will forward them to IS.

P.S. I try to search against issues here but found only either you're forward always either you're show 'welcome' always.

question

All 6 comments

Hi @dm-CaT

I will check this, never tried this. I use the check session once the user is logged in. You could re-implement the same logic as the check session iframe calls.

Greetings Damien

@dm-CaT Any updates? Where you able to implement this on your Angular Client App?

@juanp3053 no, I didn't implement that. It is not so critical for current project. But it'll be so for the next one.

In recent releases the getIsAuthorized() method will now initiate a silent_renew call (if its enabled) before emitting. If the user is already logged into the authority (identity server) the observable will emit true.

I think this is the use case you are looking for.

Can this be closed?

@profet23, I think this is enough. An issue can be closed.

@damienbod can be closed.

Was this page helpful?
0 / 5 - 0 ratings