OAuth: how to test with local URLs?

后端 未结 8 1306
粉色の甜心
粉色の甜心 2020-12-02 04:57

I am trying to test OAuth buttons, but they all (Facebook, Twitter, LinkedIn) come back with errors that seem to signal that I can not test or use them from a local

8条回答
  •  粉色の甜心
    2020-12-02 05:45

    Taking Google OAuth as reference

    • In your OAuth client Tab

      1. Add your App URI example(http://localhost:3000) to Authorized JavaScript origins URIs
    • In your OAuth consent screen

      1. Add mywebsite.com to Authorized domains
    • Edit the hosts file on windows or linux Windows C:\Windows\System32\Drivers\etc\hosts Linux : /etc/hosts to add 127.0.0.1 mywebsite.com (N.B. Comment out any if there is any other 127.0.0.1)

提交回复
热议问题