You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom backend. All works fine, but i have problem when token was expired...
What about refresh token? I didnt find anything about this problem...
Custom backend:
class MongoBackend(BaseBackend):
def get(self, blueprint):
from ..collections import users_collection
try:
user = users_collection.find_one({'_id': ObjectId(current_user.id), 'oauth.provider': 'google'})
return user['oauth']['token']
except:
return None
def set(self, blueprint, token):
from ..collections import users_collection
users_collection.update_one({'_id': ObjectId(current_user.id)}, {'$set': {'oauth.token': token}})
def delete(self, blueprint):
from ..collections import users_collection
users_collection.update_one({'_id': ObjectId(current_user.id), 'oauth': {'$set': {'token': ''}}}) # i know that didnt work
return None
When token was expired i see: oauthlib.oauth2.rfc6749.errors.InvalidClientIdError
oauthlib.oauth2.rfc6749.errors.InvalidClientIdError: (invalid_request) Missing required parameter: refresh_token
The text was updated successfully, but these errors were encountered:
Is there a better place to document this? I’d really appreciate it if you could make a pull request to improve the documentation, rather than just criticizing it!
I have a custom backend. All works fine, but i have problem when token was expired...
What about refresh token? I didnt find anything about this problem...
Custom backend:
User scheme:
When token was expired i see:
oauthlib.oauth2.rfc6749.errors.InvalidClientIdError
oauthlib.oauth2.rfc6749.errors.InvalidClientIdError: (invalid_request) Missing required parameter: refresh_token
The text was updated successfully, but these errors were encountered: