Closed greggroth closed 3 years ago
I'm guessing this will require more changes elsewhere since it requires a refresh_token
column in the database. Let me know your thoughts about this PR and if there's a better way to achieve the same end. If needed, I can add documentation/code to make sure there aren't problems with adding refresh_token
.
If you can add a migration to add the column it should work out of the box. Leave the code to sense if the column is there so it doesn't existing installations without it present.
I've added the refresh_token to the migration. OAuth2 has an instance method for requesting a new access_token using the refresh_token, but once you exchange the OAuth2 AcessToken
for an oauth-plugin ConsumerToken
, we loose that method. I'd like to see something in oauth-plugin that handles requesting a new access_token. Do you have input on where/how this should be done?
Any word on this?
+1
I think after 9 years of inactivity I'll close this 🤣
Since this only checks for the
token
, therefresh_token
is lost. This pull request will persist therefresh_token
if it's present.THIS DOES NOT RESOLVE THE FULL PROBLEM.... OAuth2 supports refreshing a token, but oauth-plugin appears to not support this ability. Without being able to refresh the access_token, authentication through OAuth2 is pretty useless. What do you think is the best way to implement this?