OAuth 2 access_token vs OpenId Connect id_token

前端 未结 4 2030
栀梦
栀梦 2020-12-05 09:46

Although I have worked with OAuth 2 before, I am a newbie to Open ID Connect.

Reading the tutorials and documentations I have come across both access_token<

4条回答
  •  鱼传尺愫
    2020-12-05 10:21

    access_token is useful to call certain APIs in Auth0 (e.g. /userinfo) or an API you define in Auth0.

    id_token is a JWT and represents the logged in user. It is often used by your app.

    is it possible to use both the access_token and the id_token for accessing the protected resources ?

    Not completely, first, you need to use id_token to log in,
    second, you will get a accessToken,
    last, use accessToken to access data.

提交回复
热议问题