Search code examples
githuboauthoauth-2.0

Github oauth multiple authorization callback URL


I want to work in my localhost and my live domain, there is any way to insert more then one callback to github oauth settings? How we solve this problem?

Redirect URLs


Solution

  • The bad news is we can't insert more than one callback to GitHub OAuth setting.

    Good news is that we can use multiple callback sub-url under our callback url, then you can redirect(proxy) it to any callback url that you want.

    for example, if your callback url is: domain.com/auth/github/callback, then the following callback url are all valid:

    1. domain.com/auth/github/callback/sub-callback-1
    2. domain.com/auth/github/callback/sub-callback-2
    3. domain.com/auth/github/callback/sub-callback-3

    etc.

    After redirect to sub-callback-N with all parameters, then we could jump to any other callback url as you expected.