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".
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:
Comments
Post a Comment