zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

Allow users to set username after first login with external provider #445

Open ratte1303 opened 5 months ago

ratte1303 commented 5 months ago

At the moment the usernames are cryptic with a prefix or in the case of telegram an numeric id.

Is it possible for the user to set their nextcloud username after sucessfull authentication with a 3rd oarty provider via a simple form. So the username is not copied from the external provider but is being set by the user?

:)

blindzero commented 5 months ago

That would be so awesome! Especially, as usernames are not able to change the username later.

zorn-v commented 5 months ago

Username (uid) can not be changed, tt is nextcloud restriction. Change display name.

blindzero commented 5 months ago

@zorn-v Yes and no... User creation by admin as well as self-registration allows that. So it should be possible to influence that on creation. Whether by configuration, eg mapping a scope field or, by dialogue?

zorn-v commented 5 months ago

OAuth is not trusted source, so uid only with prefix from there.

blindzero commented 5 months ago

@zorn-v Sorry, doesn't really make sense...self-registration is also no trusted source and there it works... But...your project, your decision. Just a pitty that demand of users is not seen...

zorn-v commented 5 months ago

There is no separate "registration" in my app. If user with provided uid exists, it just login as that user. So if oauth return something like "admin", you login as admin (same with other existing users).

zorn-v commented 5 months ago

Sorry, did not correct understand original feature request. It is exactly about separate registration step. Maybe later

rinyafii commented 4 months ago

This would be really nice. I'd like to use this to allow my private development Discord server to access my Nextcloud, but I'm worried if, for example, their Discord accounts get terminated randomly (as happens with the state of Discord support) they lose access to their profile.

Adding in a registration step where they assign themselves a username and then they can either login with that or their Discord account (as well as unlink and re-link their account if needed) would be great.

zorn-v commented 4 months ago

they lose access to their profile

They can set password via "forgot password" for example, and login as usual. Did not understand how setting username helps with deleted account in discord.