Open erwanmace opened 4 months ago
Sending a request with Token from an iOS app using Firebase SDK 10.20
Trying to decode the token server side using auth.verify_id_token(id_token, clock_skew_seconds=60)
I have verified that id_token is a valid token and definitely not an empty string. However the above throws ValueError
authorization = request.headers.get('Authorization') if authorization and authorization.startswith('Bearer '): id_token = authorization.split('Bearer ')[1] print('id_token: %s' % id_token) else: json_abort(401, message="Invalid authorization A") try: decoded_token = auth.verify_id_token(id_token, clock_skew_seconds=60) print('decoded_token: %s' % decoded_token) except auth.ExpiredIdTokenError: print('expired token: %s' % id_token) json_abort(401, message="Expired Token") except auth.InvalidIdTokenError: print('invalid token: %s' % id_token) json_abort(401, message="Invalid Token") except auth.RevokedIdTokenError: print('revoked token: %s' % id_token) json_abort(401, message="Revoked Token") except auth.CertificateFetchError: print('Certificate error: %s' % id_token) json_abort(401, message="Certificate error") except auth.UserDisabledError: print('UserDisabledError error: %s' % id_token) json_abort(401, message="UserDisabledError") except ValueError: print('Value Error: %s' % id_token) json_abort(401, message="Token Value Error: %s" % id_token)
Hey @erwanmace, our tests for this API seem to be passing with no issues. Are you able to share the full error message/logs with us? Are you only seeing this issue with the most recent SDK release?
Steps to reproduce:
Sending a request with Token from an iOS app using Firebase SDK 10.20
Trying to decode the token server side using auth.verify_id_token(id_token, clock_skew_seconds=60)
I have verified that id_token is a valid token and definitely not an empty string. However the above throws ValueError
Relevant Code: