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

Add support for getting email from server variable #4

Open
jobec opened this issue Jun 24, 2021 · 2 comments
Open

Add support for getting email from server variable #4

jobec opened this issue Jun 24, 2021 · 2 comments

Comments

@jobec
Copy link

jobec commented Jun 24, 2021

First of all, thanks for this nice plugin!

I'm using it in combination with Caddy in front of Piwigo and these Caddy plugins:

I use it to let people log in to my album with a Google or Azure (Hotmail, outlook, etc etc account). It forwards some user details in specific HTTP headers. One of them I used in this plugin as the source for the username.

What would be a great addition is to also do the same for the user's email address. Now it's only possible to set the user's name + some fixed domain as a email address. But as the real email is in the OpenID Connect token from Google/Azure, I want to get it from there.
The chance that every visitor is under one domain with his email is also near zero.

@sshambar
Copy link
Owner

I'm not familiar with Caddy, but if it supplies the email as a Server variable, it wouldn't be difficult to add an option to use that as the default when creating an account (perhaps even syncing the value with the account on authentication?...hmmm).

I'm a little swamped this week, but I'll see if I can investigate this "soon" (perhaps in the coming weeks)

@sshambar
Copy link
Owner

I've pushed an updated version (0.5.1) that adds support for defaulting a new users email from server variables. If you're still interested in this feature, give it a try, and if it works for you I'll push a new release :)

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