meteor - Getting OAuth tokens without user registration -


i want store multiple access/refresh token in separate document, without going through built in oauth workflow.

i have tried manually make request, when redirected application, meteor oauth package 'highjacks' route , fails.

i tried reverse engineer meteor oauth packages, they're confusing.

any advice or highlevel/detailed plan on how accomplish this?

you should able set oauth redirect uri whatever want to. google, when set new client id, 1 of fields "authorized redirect uris".

screen show of create client id

if added meteor-accounts package, remove might interfere. basic steps oauth are:

  • create client credentials (client_id, client_secret) in control panel oauth provider. including setting redirect_uri
  • generate login url using client_id, client_secret, , redirect_uri
  • implement redirect_uri in app capture auth code
  • exchange auth code access token (and refresh token)
  • if access token expires, new access token using refresh token

here blog post more detail:

http://blog.philcruz.com/2015/05/manually-getting-oauth-tokens-in-meteor.html

here example project manually uses oauth:

https://github.com/philcruz/meteor-gmail-example


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -