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
Auth0User declares $userInfo and $accessToken as private instead of protected.
This means our child class cannot override these values so we can't get getAuthIdentifier to return a different identifier (our use case being we don't want the locally stored user to have 'sub' as the column name and would prefer something more obvious like 'auth0_id' in the db users table).
e.g.
<?php
namespace Example\Users;
class ExampleUser extends \Auth0\Login\Auth0User
{
public function getAuthIdentifier()
{
return $this->userInfo['auth0_id'];
}
}
Is this something you can fix?
The text was updated successfully, but these errors were encountered:
@cjd118 - I see what you're saying here and I don't see any reason that couldn't be protected instead. I don't think we expected this class to be extended when it was written but I see how this would be helpful.
Give me some time to take a closer look to make sure I'm not missing anything and I can put through a PR for that. Thanks for the feedback!
Hi,
Auth0User
declares$userInfo
and$accessToken
as private instead of protected.This means our child class cannot override these values so we can't get
getAuthIdentifier
to return a different identifier (our use case being we don't want the locally stored user to have 'sub' as the column name and would prefer something more obvious like 'auth0_id' in the db users table).e.g.
Is this something you can fix?
The text was updated successfully, but these errors were encountered: