Closed clandau closed 3 years ago
Someone is attempting to deploy a commit to a Personal Account owned by @drewclem on Vercel.
@drewclem first needs to authorize it.
I'm pretty sure this fixes the error with the ID token expiring too, haven't been able to recreate it since and it's now refreshing automatically as it should in AuthContext
when getIdToken
is called.
Edit - doesn't fix the routing to sign-in. Still working
Description
What does this PR do?
Code to check whether a company has all required info in their account was getting set too soon, and in the case of a user pressing the back button, the
profileInfo
returnednull
, throwing an error.profileInfo
exists and if not, return false.Routing to
/thanks
after payment sent the user back tosign-in
. This was happening whenverifyIdToken
would throw an expired token error.AuthContext
updates an expired token whengetIdToken
is called. If we don't throw on expired token, it works itself out.verifyIdToken
method to not throw the error if the token is expired. There are other ways we could do this, but this is nice and simple and works. I'm happy to discuss alternate solutions if anyone wants.Related Tickets and Documents
What gif best describes this PR or how it makes you feel? (optional)