Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing client specific scope (grants) in UserinfoController #2

Open
typoworx-de opened this issue Jan 28, 2022 · 1 comment
Open

Comments

@typoworx-de
Copy link

Great work and thanks for sharing these great oauth with the community.

I'm struggling with a problem and I'm not shure if this is configuration specific issue or a bug. I got oAuth & Authentification agains frontend-user working.

Doing the call to /oauth2/userinfo works as well, but it gives me only {"sub": 10} (FE-User uid). In the client record I configured the following allowed_scopes: profile, email, openid.

So I would expect these scope/grants are respected. But for some reason the $scopes in UserinfoController are an empty array missing all the grants from client-record.

Is this a bug in UserinfoController or a misconfiguration?

@r3h6
Copy link
Owner

r3h6 commented Jan 31, 2022

As far as I know the underlying library respects the scopes submitted in the token. These scopes must be requested already in very beginning of the authorization flow.
At least in my local setup the endpoint returns the data from the fe_user.

Maybe enable debug logs gives you a better insight:

$GLOBALS['TYPO3_CONF_VARS']['LOG']['R3H6']['Oauth2Server']['writerConfiguration'] = [
    \TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
        \TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
            // 'logFile' => 'typo3temp/logs/oidc.log'
        ],
    ],
];

$GLOBALS['TYPO3_CONF_VARS']['LOG']['R3H6']['OidcServer']['writerConfiguration'] = [
    \TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
        \TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
            // 'logFile' => 'typo3temp/logs/oidc.log'
        ],
    ],
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants