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
In "Callback URL", type the full URL to redirect to after a user authorizes the installation. This URL is used if your app needs to identify and authorize user-to-server requests.
A callback URL is the URL that is invoked after OAuth authorization for the consumer (connected app). In some contexts, the URL must be a real URL that the client's web browser is redirected to.
Callback URLs are the URLs that Auth0 invokes after the authentication process. Auth0 redirects back to this URL and appends additional parameters to it, including an access code which will be exchanged for an id_token , access_token and refresh_token .
I solved this issue by creating a dedicated OAuth application on Github for my local development environment. So I have the following 2 OAuth applications:
My official OAuth application for production
ABC
123
https://example.com/api/v1/security/oauth/github/callback
My private OAuth application for development
XYZ
456
https://localhost/api/v1/security/oauth/github/callback
When I configure my API in local, I use the ID and secret of the development application (2). And in production I use the ID and secret of my official application (1).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With