Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customized redirect URL ? #37

Closed
kerphi opened this issue Nov 12, 2015 · 2 comments
Closed

customized redirect URL ? #37

kerphi opened this issue Nov 12, 2015 · 2 comments

Comments

@kerphi
Copy link

kerphi commented Nov 12, 2015

README says that:

For redirect URL of your OAuth application you should always use this format:

protocol://[host]/connect/[provider]/callback

But in my application I'd like to use a customized redirect URL, for example:

Is it possible ?

@simov
Copy link
Owner

simov commented Nov 12, 2015

The OAuth redirect URL is used internally by Grant. What you probably want to is to set up your callback URL. I'm giving you an example with Twitter:

  1. Set your OAuth application redirect url to http://mywebsite.com/connect/twitter/callback
  2. Set your your server's callback which is where you want to receive the final response data:
twitter: {
  key: '',
  secret: '',
  callback: '/handle_twitter_callback'
}

Notice that the redirect URL of your OAuth app and the path to handle the callback in your app are different. Take a look at the examples, here is the most basic one.

Only in very rare cases you really need a custom redirect URL for your OAuth application. Let me know if that's the case.

@kerphi
Copy link
Author

kerphi commented Nov 14, 2015

Thank you.
Le 12 nov. 2015 21:50, "simo" notifications@github.com a écrit :

The OAuth redirect URL is used internally by Grant. What you probably you
want to is to set up your callback URL. I'm giving you an example with
Twitter:

  1. Setup your OAuth application redirect url to
    http://mywebsite.com/connect/twitter/callback
  2. Setup your your server's callback which is where you want to
    receive the final response data:

twitter: {
key: '',
secret: '',
callback: '/handle_twitter_callback'
}

Notice that the redirect URL of your OAuth app and the path to handle the
callback in your app are different. Take a look at the examples, here is
the most basic one
https://github.com/simov/grant/tree/master/example/basic.

Only in very rare cases you really need a custom redirect URL for your
OAuth application. Let me know if that's the case.


Reply to this email directly or view it on GitHub
#37 (comment).

@simov simov closed this as completed Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants