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

[FR]: Support custom providers with AuthProviderID #13429

Closed
kazumanagano opened this issue Jul 31, 2024 · 3 comments · Fixed by #13433
Closed

[FR]: Support custom providers with AuthProviderID #13429

kazumanagano opened this issue Jul 31, 2024 · 3 comments · Fixed by #13433

Comments

@kazumanagano
Copy link

kazumanagano commented Jul 31, 2024

Description

Since #13097, OAuthProvidel.credential method now accepts the AuthProviderID as an Enum.

In addition, methods that have the existing String type providerID as an argument now display a Deprecated warning and request migration.

However, this does not support custom ProviderIDs such as OpenID Connect, so products that use it cannot be migrated.
https://firebase.google.com/docs/auth/ios/openid-connect#manual

API Proposal

Please make it possible to take a custom ProviderID as an argument as shown below, or prepare a separate method.

public enum AuthProviderID: String {
  case apple = "apple.com"
  case email = "password"
  case facebook = "facebook.com"
  case gameCenter = "gc.apple.com"
  case gitHub = "github.com"
  case google = "google.com"
  case phone
  case custom(String)
}

OR

  // For Custom Provider
  public static func credential(providerID: String, idToken: String,
                                rawNonce: String,
                                accessToken: String? = nil) -> OAuthCredential {

Firebase Product(s)

Authentication

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777
Copy link
Member

@kazumanagano Thanks for the report. We appreciate your quick feedback on 11.0.0!

I've proposed a fix at #13433 and will follow up with the team on getting it reviewed and merged.

@paulb777 paulb777 self-assigned this Jul 31, 2024
@paulb777 paulb777 added this to the 11.1.0 - M152 milestone Jul 31, 2024
@kazumanagano
Copy link
Author

Thank you for your great and quick fix!
I'm looking forward to the release!

@firebase firebase locked and limited conversation to collaborators Aug 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants