OAuth: how to test with local URLs?

后端 未结 8 1299
粉色の甜心
粉色の甜心 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:26

    Google doesn't allow test auth api on localhost using http://webporject.dev or .loc and .etc and google short link that shortened your local url(http://webporject.dev) also bit.ly :). Google accepts only url which starts http://localhost/...

    if you want to test google auth api you should follow these steps ...

    if you use openserver go to settings panel and click on aliases tab and click on dropdown then find localhost and choose it.

    now you should choose your local web project root folder by clicking the next dropdown that is next to first dropdown.

    and click on a button called add and restart opensever.

    now your local project available on this link http://localhost/ also you can paste this local url to google auth api to redirect url field...

提交回复
热议问题