How to deal with arbitrary amount of redirect URIs?

后端 未结 1 1295
清酒与你
清酒与你 2020-12-16 13:13

I\'m developing an application where the users have their own URLs, and they need to use Google API - of course with different redirect URIs, like

  • www.example.
相关标签:
1条回答
  • 2020-12-16 14:06

    Wildcards are not supported in Google OAuth2 redirect URIs. I think your best best is to use a single redirect URI, and pass in the user information in the state parameter. The state parameter is returned to you in response. Then, when you receive the authorization code/tokens, you can lookup the state parameter and handle the response appropriately (e.g., redirect to your user-specific URLs).

    This answer has more information.

    0 讨论(0)
提交回复
热议问题