Angular-auth-oidc-client: Sending credentials to fetch token

Created on 20 Jun 2017  路  4Comments  路  Source: damienbod/angular-auth-oidc-client

Hi,
This might be a question that has a trivial answer, but I'm new to Angular and OIDC.

In order to get a token, where do I specify the Authorization (in header of POST request), and grant_type, username and password (in POST request's body) in the code?

Thanks a lot for your support and for your work!

Most helpful comment

Ah ok, you should not use the hybrid flow with a pure Angular SPA.

All 4 comments

Hi @vicver82 , yes
First you login on the server, the SPA should not deal with user, passwords. A login button redirects you the the server where you login and then you're redirected back the the angular application where you have a token and an id_token.

https://github.com/damienbod/AspNet5IdentityServerAngularImplicitFlow/blob/master/src/AngularClient/angularApp/app/dataeventrecords/DataEventRecordsService.ts#L27

Greetings Damien

Thank you for your reply @damienbod !
It turns out we are using Hybrid flow with OIDC, which is why I couldn't make this library work.

Ah ok, you should not use the hybrid flow with a pure Angular SPA.

Thanks for your support @damienbod !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brentos99 picture brentos99  路  4Comments

mikeandersun picture mikeandersun  路  4Comments

vit100 picture vit100  路  4Comments

daudihusbands picture daudihusbands  路  3Comments

sdev95 picture sdev95  路  3Comments