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
dipper_ is the token prefix. It is not being stripped before being passed to my identifier. Looking at the code in vendor/cakephp/authentication/src/Authenticator/TokenAuthenticator.php, I found the function stripTokenPrefix() which does something odd:
return str_ireplace($prefix . ' ', '', $token);
Why is the replace concatenated with an empty space? That's not part of my prefix.
The text was updated successfully, but these errors were encountered:
If you have a space in your prefix, then include that in the config; don't force it upon everyone.
That's not how the class was designed/built though. Changing it now will break existing usage and can't be done. We could add another option to remove the prefix on the token value 🤷
In src/Application.php
Testing like this:
dipper_
is the token prefix. It is not being stripped before being passed to my identifier. Looking at the code invendor/cakephp/authentication/src/Authenticator/TokenAuthenticator.php
, I found the functionstripTokenPrefix()
which does something odd:Why is the replace concatenated with an empty space? That's not part of my prefix.
The text was updated successfully, but these errors were encountered: