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

Convert FIRAuthProvider.m constants into enum #9236

Closed
Idomo opened this issue Jan 20, 2022 · 1 comment
Closed

Convert FIRAuthProvider.m constants into enum #9236

Idomo opened this issue Jan 20, 2022 · 1 comment

Comments

@Idomo
Copy link

Idomo commented Jan 20, 2022

Feature proposal

  • Firebase Component: Auth

Description

Currently the file FIRAuthProvider.m contains auth provider ids, as constants.
My request is to replace these with an enum, so it'll be easier to make switch-case block when needed.

It just makes a lot more sense than creating my own enum by manually copying the values from the file or make some non-convenience long and unnecessary else-if.
P.S. You may add as well case for AppleProviderID as "apple.com".

Usage case example

Generate the correct credential for reauthenticate(with: credential) based on Auth.auth().currentUser?.providerData.first?.providerID.

@paulb777
Copy link
Member

Implemented in auth-swift branch.

@paulb777 paulb777 self-assigned this May 29, 2024
@firebase firebase locked and limited conversation to collaborators Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants