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?
Hi,
I am having the same issue. I am using Instagram omniauth adaptor but then I would like to use the Instagram gem to call the API but I don't have access to the Instagram access_token of the logged in user.
Hello All,
I'm not sure if devise_token_auth is the right tool for this job. I'm currently using
devise_token_auth
withomniauth_oauth2
andomniauth-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 thegoogle-api-client
, but none of them explain how to integrate this withdevise_token_auth
.I looked through the code and didn't see that
devise_token_auth
actually saves therefresh_token
either, which is needed to get updatedaccess_token
.Is this possible with
devise_token_auth
or do I need to build a custom solution?Thanks, Colin