Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个直接链接。这样,我就可以将其提供给我的客户,让他们无需用户名和密码即可登录。
我试过了,/users/{user_id}/impersonate但它持续了很短的时间。我要永久链接!
/users/{user_id}/impersonate
您应该使用模拟。正如你所说,它的时间很短。
您可以在数据库中创建永不过期的票证。然后,您有一个类似的端点/automatic-login/[ticketId]接收必须在您的数据库上的 TicketID。如果 TicketId 在您的数据库中;您在那个精确的时刻从 Auth0 调用 Impersonate API,取回链接,然后将重定向发送给 USER 到该模拟端点。
/automatic-login/[ticketId]
这样,您就可以在那个精确的时刻使用模拟,所以它会起作用。
说得通?