Skip to content

FR: auth.verify_id_token should throw a more specific exception #252

Closed
@jvorcak

Description

@jvorcak
  • Firebase SDK version:
  • Library version: 2.15.0
  • Firebase Product: auth

I'm trying to verify a token using the following code

from firebase_admin import auth
token = auth.verify_id_token(...)

Everything works great until a token is expired. In that case, I get ValueError.
screenshot 2019-01-17 at 21 22 17

I think ValueError is pretty generic, wouldn't it make sense to create a custom exception for this so that an app knows what exactly happened?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions