Skip to content

Conversation

@morganchen12
Copy link
Contributor

Adds the swift auth sample to the catalogue app.

@morganchen12
Copy link
Contributor Author

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.

@dakeshi dakeshi mentioned this pull request Aug 2, 2016
import FirebaseGoogleAuthUI
import FirebaseFacebookAuthUI

let kFirebaseTermsOfService = NSURL(string: "https://www.firebase.com/terms/terms-of-service.html")!
Copy link
Member

Choose a reason for hiding this comment

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


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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Raise issue.

@ianbarber
Copy link
Contributor

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 {
Copy link
Contributor

@dakeshi dakeshi Aug 3, 2016

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.

@ulukaya
Copy link
Member

ulukaya commented Aug 3, 2016

LGTM after addressing few comments

@mustafat0k
Copy link

@iulukaya Hayvan gibi Git kullanıyorsunuz tebrik ederim :) 👍

@morganchen12 morganchen12 deleted the auth-sample branch October 5, 2016 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants