You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When onFailure processes a 401 status code it adds a Bearer token (using $request->withHeader), then onBefore also adds a Bearer token but uses $request->withAddedHeader which effectively creates an Authorization Header that's got 2 duplicate Bearer tokens in it, causing authentication to fail.
Here's the Authorization header that actually gets sent: Authorization: Bearer 5b3df637e24ace993fc5eb87967db5be92fc35df, Bearer 5b3df637e24ace993fc5eb87967db5be92fc35df
Looks like $request->withAddedHeader simply needs to be changed to $request->withHeader
The text was updated successfully, but these errors were encountered:
When onFailure processes a 401 status code it adds a Bearer token (using $request->withHeader), then onBefore also adds a Bearer token but uses $request->withAddedHeader which effectively creates an Authorization Header that's got 2 duplicate Bearer tokens in it, causing authentication to fail.
Here's the Authorization header that actually gets sent:
Authorization: Bearer 5b3df637e24ace993fc5eb87967db5be92fc35df, Bearer 5b3df637e24ace993fc5eb87967db5be92fc35df
Looks like $request->withAddedHeader simply needs to be changed to $request->withHeader
The text was updated successfully, but these errors were encountered: