extend provider to include scope which defaults to openid email profile on redirect #2749

Open
viehlieb wants to merge 1 commits from viehlieb/frontend:feature/enable_oidc_custom_scopes into main
Contributor

Until now the scope for oidc providers has been hard coded to be openid profile email.
This change leaves core funtionality intact as the scope defaults to 'openid email profile' on redirect, if no scope is specified in vikunja/api/config.yml.

If scope is defined in vikunja/api/config.yml e.g. as:

openid:
	enabled: true
	redirecturl: <frontend url>/auth/openid/
	providers:
	- name: "authentiklogin"
		authurl: oidcprovider/application/o/vikunja/
		clientid: yourclientid
		clientsecret: yourclientsecret
		scope: openid email profile custom_scope

... it will appear as scope=openid+email+profile+custom_scope
in the redirect Url.

Until now the scope for oidc providers has been hard coded to be openid profile email. This change leaves core funtionality intact as the scope defaults to 'openid email profile' on redirect, if no scope is specified in vikunja/api/config.yml. If scope is defined in vikunja/api/config.yml e.g. as: ``` openid: enabled: true redirecturl: <frontend url>/auth/openid/ providers: - name: "authentiklogin" authurl: oidcprovider/application/o/vikunja/ clientid: yourclientid clientsecret: yourclientsecret scope: openid email profile custom_scope ``` ... it will appear as **scope=openid+email+profile+custom_scope** in the redirect Url.
viehlieb added 1 commit 2022-11-23 16:09:03 +00:00
Member

Hi viehlieb!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2749-feature-enableoidccustomscopes--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi viehlieb! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2749-feature-enableoidccustomscopes--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
Owner

But Vikunja only uses email and profile scopes? What do you need to specify a custom scope for?

But Vikunja only uses email and profile scopes? What do you need to specify a custom scope for?
dpschen changed title from extend provider toinclude scope which defaults to openid email profile on redirect to extend provider to include scope which defaults to openid email profile on redirect 2022-12-07 14:02:08 +00:00
Owner

Closing this as it appears stale.

Please rebase and reopen if you think this is still relevant.

Closing this as it appears stale. Please rebase and reopen if you think this is still relevant.
konrad closed this pull request 2023-10-22 17:30:58 +00:00
konrad reopened this pull request 2023-12-13 16:53:19 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.