lynndylanhurley / lynndylanhurley/devise_token_auth
Getting access_token to use for API requests to Google
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello All,
I'm not sure if devise_token_auth is the right tool for this job. I'm currently using devise_token_auth with omniauth_oauth2 and omniauth-google-oauth2 to authenticate users and this is working fine.
What I want to do is to somehow use the existing tokens saved in the DB, which have been authorized by the users already, to make requests against Google oauth APIs such as getting user's Contacts or listing their Drive files.
I've read a bunch of tutorials on how to do this with just omniauth_oauth2, omniauth-google-oauth2 and the google-api-client, but none of them explain how to integrate this with devise_token_auth.
I looked through the code and didn't see that devise_token_auth actually saves the refresh_token either, which is needed to get updated access_token.
Is this possible with devise_token_auth or do I need to build a custom solution?
Thanks,
Colin
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names devise_token_auth, omniauth_oauth2, omniauth-google-oauth2, and google-api-client but no files or tests. Review how OAuth credentials are persisted, then compare that behavior with Google's refresh-token requirements; done means determining whether existing credentials can support Google API requests or defining the custom integration required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100