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

[OAuth] Implement OAuth utility functions #139

Open
2 tasks
b123400 opened this issue Apr 25, 2017 · 1 comment
Open
2 tasks

[OAuth] Implement OAuth utility functions #139

b123400 opened this issue Apr 25, 2017 · 1 comment
Assignees

Comments

@b123400
Copy link
Contributor

b123400 commented Apr 25, 2017

connect SkygearIO/features#5

  • New method container.getOAuthTokens()

    • Return a dictionary of OAuth tokens of the current user

    • Call skygear-server user:oauth_tokens user:set_oauth_token

    • Pseudo code

      container.getOAuthTokens()['com.facebook']['access_token']
      
  • New method container.refreshToken(provider_id)

    • A convenient method that refreshs access_token if needed, and if possible.
    • Updates database after refresh
    • Returns the new token
@b123400 b123400 self-assigned this Apr 25, 2017
@b123400 b123400 changed the title Implement oauth providers for Facebook and Google [OAuth] Implement OAuth providers for Facebook and Google Apr 25, 2017
@b123400 b123400 changed the title [OAuth] Implement OAuth providers for Facebook and Google [OAuth] Implement OAuth utility functions May 20, 2017
@rickmak
Copy link
Member

rickmak commented May 26, 2017

I think the API should be container.getOAuthTokens(provider_id). It will more symmetry with container.refreshToken.

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