【发布时间】:2019-11-08 21:44:11
【问题描述】:
我正在配置 auth0 以与 React 一起使用。我能够按照本指南进行操作:
但是我不知道如何获得访问代码。我想将其与来自用户/个人信息的其他信息一起存储在我的数据库中,并将其存储在 redux 存储中以与我的后端数据库一起使用,以将用户链接到数据。
When a user logs in, Auth0 returns three items:
access_token,
id_token,
expires_in
You can use these items in your application to set up and manage authentication.
如果有任何关于如何使用上面显示的钩子格式获取访问和 id 令牌的指针,将不胜感激。
【问题讨论】:
-
我还在查看文档以使用钩子实现 Auth0。以下链接可能会有所帮助:auth0.com/docs/quickstart/spa/react 他们最近更新了文档和 github 存储库。
标签: reactjs authentication auth0