-
Notifications
You must be signed in to change notification settings - Fork 488
Auth sample #95
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
Auth sample #95
Conversation
|
This sample is considerably more gross than the last one, since each individual login provider requires their own sort of app setup with instructions on their own websites and no one wants to check their API keys or OAuth tokens into a public repo. |
| import FirebaseGoogleAuthUI | ||
| import FirebaseFacebookAuthUI | ||
|
|
||
| let kFirebaseTermsOfService = NSURL(string: "https://www.firebase.com/terms/terms-of-service.html")! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
129fe77 to
6048ac0
Compare
|
|
||
| func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool { | ||
| let sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String? | ||
| // Seems like an oversight that this API doesn't take a nullable sourceApplication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise issue.
|
This LGTM - I'm happy for you to merge at your discretion on this one, and we can do follow ups in separate reqs - it may be easier to investigate that terms of service issue with it in the repo. |
| func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool { | ||
| let sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String? | ||
| // Seems like an oversight that this API doesn't take a nullable sourceApplication. | ||
| if FIRAuthUI.authUI()?.handleOpenURL(url, sourceApplication: sourceApplication!) ?? false { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceApplication is String optional. sourceApplication could be nil (#99) and then sourceApplication! makes a runtime error. Isn't it?
I think that use sourceApplication ?? "" you mentioned in Auth README example or make the optional binding would be better in this case.
|
LGTM after addressing few comments |
|
@iulukaya Hayvan gibi Git kullanıyorsunuz tebrik ederim :) 👍 |
Adds the swift auth sample to the catalogue app.