Closed tito closed 1 year ago
If you use fiefAuth.redirectToLogin(...), and the workspace cannot be found, you'll have
fiefAuth.redirectToLogin(...)
getOpenIDConfiguration()
{"detail":"CANT_DETERMINE_VALID_WORKSPACE"}
authorizationEndpoint
undefined
End result is, in your app, you end up with redirecting with an url like http://.../undefined?response_type=code&client_id=.... And no clue why :)
http://.../undefined?response_type=code&client_id=....
Steps to reproduce the behavior:
Good catch, @tito, thanks 🙏
I've added proper error handling for this in 0.13.5. You can look for FiefRequestError for those cases.
0.13.5
FiefRequestError
Describe the bug
If you use
fiefAuth.redirectToLogin(...)
, and the workspace cannot be found, you'll havegetOpenIDConfiguration()
receive an error HTTP 400 with content{"detail":"CANT_DETERMINE_VALID_WORKSPACE"}
authorizationEndpoint
will beundefined
End result is, in your app, you end up with redirecting with an url like
http://.../undefined?response_type=code&client_id=....
And no clue why :)To Reproduce
Steps to reproduce the behavior:
Configuration