Skip to content

Conversation

@SUPERCILEX
Copy link
Collaborator

@SUPERCILEX SUPERCILEX commented May 11, 2017

@samtstern While doing some debugging, I made a typo and passed in a hardcoded string to the IdpBuilder#setProvider method that ended in a runtime exception. 😢 I think we can be fancier with our supported providers so this PR add our own SupportedProvider annotation. 😎:smile:

Here's an example error:
image

PS: sorry for the yucky commit history, I built it off another PR.

…ted-providers-annotation

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/provider/FacebookProvider.java
#	auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java
#	auth/src/main/java/com/firebase/ui/auth/ui/idp/CredentialSignInHandler.java
…ted-providers-annotation

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
#	auth/src/main/java/com/firebase/ui/auth/provider/FacebookProvider.java
#	auth/src/main/java/com/firebase/ui/auth/provider/GoogleProvider.java
#	auth/src/main/java/com/firebase/ui/auth/provider/TwitterProvider.java
#	auth/src/main/java/com/firebase/ui/auth/ui/User.java
#	auth/src/main/java/com/firebase/ui/auth/ui/accountlink/WelcomeBackPasswordPrompt.java
#	auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailActivity.java
#	auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
#	auth/src/main/java/com/firebase/ui/auth/util/signincontainer/SignInDelegate.java
#	auth/src/test/java/com/firebase/ui/auth/testhelpers/FakeAuthResult.java
#	auth/src/test/java/com/firebase/ui/auth/ui/email/RegisterEmailActivityTest.java
#	auth/src/test/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPromptTest.java
#	auth/src/test/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivityTest.java
#	auth/src/test/java/com/firebase/ui/auth/ui/idp/CredentialSignInHandlerTest.java
…ted-providers-annotation

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/ui/idp/CredentialSignInHandler.java
FacebookAuthProvider.PROVIDER_ID, FACEBOOK_PROVIDER,
TwitterAuthProvider.PROVIDER_ID, TWITTER_PROVIDER
})
public @interface SupportedProvider {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to be public? I feel like it could be useful, but it also means we have to maintain backwards compatibility...

cleanup();
}

public void cleanup() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samtstern What size level of changes do you want me to split into other PRs? I'm happy to move this to another PR. (it was just a small nit Intellij complained about)

@SUPERCILEX
Copy link
Collaborator Author

@samtstern do you want to take a look at this one before 2.0? I think it's a nice improvement to help devs know what they should be passing in for the provider.

@samtstern
Copy link
Contributor

@SUPERCILEX yep I'll add this one to 2.0 milestone

@SUPERCILEX
Copy link
Collaborator Author

@samtstern cool!

@samtstern
Copy link
Contributor

Forgot about this one, gonna merge it!

@samtstern samtstern merged commit f528a22 into firebase:version-2.0.0-dev Jun 1, 2017
@SUPERCILEX SUPERCILEX deleted the supported-providers-annotation branch June 2, 2017 00:41
@SUPERCILEX
Copy link
Collaborator Author

Awesome possum! Gonna go merge stuff now 😃

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

Successfully merging this pull request may close these issues.

2 participants