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

Password Update screen should be hidden for Google/FB auth users #30

Open
robbiew opened this issue Jan 4, 2020 · 1 comment
Open

Comments

@robbiew
Copy link

robbiew commented Jan 4, 2020

Users who have authenticated via Google or FB only still see the 'Password Update' fields on the user profile screen. This should be hidden from them. If they try and fill it out, they'll get "Create Account - Error - user does not have a password"

@robbiew robbiew changed the title Seeing Password Update screen for Google/FB auth users Password Update screen should be hidden for Google/FB auth users Jan 4, 2020
@robbiew
Copy link
Author

robbiew commented Jan 5, 2020

My solution:
in Settings.tsx
import {getProviders} from '../util/helpers';
Then, in function EditProfile()
const providers = getProviders(user); const providerPassword = providers.includes('password');

Then, conditionally render in return:
{providerPassword ? passwordChange : noPassword}

(cut-n-paste Password Update into const passwordChange...)

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

1 participant