I am unfortunate to share that there’s still an issue when authenticating using the generic provider. When I want to extract the access_token
using pn.state.access_token
, an error occurs when falling into the decode_token(access_token)
method where it seems the access_token in my case does not need to be decoded again as it is well received when calling self._decode_cookie('access_token')
.
In short, the version works well if I comment the last 3 lines of the following method in state.py
:
@property
def access_token(self) -> str | None:
"""
Returns the OAuth access_token if enabled.
"""
if self.user in self._oauth_user_overrides and 'access_token' in self._oauth_user_overrides[self.user]:
return self._oauth_user_overrides[self.user]['access_token']
access_token = self._decode_cookie('access_token')
if not access_token:
return
# decoded_token = decode_token(access_token)
# if decoded_token['exp'] <= dt.datetime.now(dt.timezone.utc).timestamp():
# return None
return access_token
Let me know if I can assist on this. Thank you for the prompt upgrade.