GithubHelp home page GithubHelp logo

simplicitymobile / simplicity Goto Github PK

View Code? Open in Web Editor NEW
681.0 681.0 66.0 62 KB

A simple way to implement Facebook and Google login in your iOS apps.

License: Apache License 2.0

Objective-C 1.98% Swift 93.98% Ruby 4.05%
facebook google ios login oauth

simplicity's People

Contributors

edjiang avatar omgitstom avatar pherret avatar talisk avatar teameh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplicity's Issues

Add Track App Installs and App Opens!!

This would be a brilliant feature if you could add it in this repo. Thanks!!

App Events let you measure installs on your mobile app ads, create high value audiences for targeting, and view analytics including user demographics. To log an app activation event, first, import the Facebook SDK in your AppDelegate.m file:

import <FBSDKCoreKit/FBSDKCoreKit.h>

Next, add the following to your app delegate:

  • - (void)applicationDidBecomeActive:(UIApplication *)application {
    [FBSDKAppEvents activateApp];
    }
  • - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[FBSDKApplicationDelegate sharedInstance] application:application
    didFinishLaunchingWithOptions:launchOptions];
    return YES;
    }
  • - (BOOL)application:(UIApplication *)application
    openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication
    annotation:(id)annotation {
    return [[FBSDKApplicationDelegate sharedInstance] application:application
    openURL:url
    sourceApplication:sourceApplication
    annotation:annotation];
    }
    When people install or engage with your app, you'll see this data reflected in your app's Insights dashboard.

Modals and safaryViewController bug

Hi,

I'm using modals in my projects and if I use simplicity to open the safariController It dismiss my modals so its not convenient from the user point of view. I've fixed it by adding :

safari?.modalPresentationStyle = .overFullScreen

just before
topController?.present(safari!, animated: true, completion: nil)

in presentSafariView(_ url:) in Simplicity class

As safariView is present over full screen anyway I don't think there are drawbacks to do so. Can I have you point of view on this ?

I have everything setup, yet calling the login function appears to do nothing.

I called the function 'Simplicity.login(Google())' within my viewDidLoad() function in the ViewController.swift file.

I expected something to happen when I tried to print the accessToken within the function's scope, yet nothing happens when the code runs. There's no errors so I'd like to know what step I'm missing.

Thanks!

vk.com

If their API is not well-documented in English, I can help.

App will crash if the fb scheme isn't first in CFBundleURLSchemes

Hey !

First, thanks for your lib 👍

I noticed that if you don't put the fb scheme in the CFBundleURLSchemes list, then the app will produce an error / crash (at least it'll go to preconditionFailure).

Reason if that at this line let urlSchemes = urlTypes.flatMap({($0["CFBundleURLSchemes"] as? [String])?.first }) you take .first, instead you could do a reduce instead of the flatMap.

Would you merge a PR if I were to submit one?

Thanks,
Vincent

id_token Google

When connecting with Google, there is a way to get the access_token AND the id_token (used for private api) ?

FB Login in testflight and Store

Hi, FB login works fine in local but when I upload the app to TestFlight or Store is not working (My FB App is in production mode).

LINE

Hi, can you create a provider for LINE? Thank you so much!

Google login keeps asking for authorizations

Hi everyone,

I was wondering why this strange behavior happen in my project : every time I try to re-connect to an account I already logged into, the Google Explorer (whom already know my password) keep asking me authorizations, even if it's my 3rd login to the same account.
If I take a look at the Google documentation, it shouldn't be asking me permission over time :

Before making the first authenticated call, the Explorer asks you to choose which scope you would like to use when granting it access to your data.

Here's the code responsible for the login, but I guess this behavior doesn't come from him :)

let google = Google()
google.scopes = ["email"]
google.login { [unowned self] (accessToken, error) in
    if let token = accessToken {
        print("Call Google API with token : \(token)")
    }
}

So I was wondering if you guys know about that, and if a workaround exists :)

Thank you!
Jérôme

Callback not called

Hi, when the user press the Done button at the top of the safari view the simplicity callback is not called. I think it should be because now the code can't have any clue if the safari view is cancelled like this.

Flickr

Can you create a provider for Flickr?

Instagram

Hi, have you thought of a new provider for Instagram? Thanks

Objective-c

Hi

I'm trying to make it work using objective-c.

Cannot found hot to call this using Obj-C syntax. Can i please ask if someone have done it with success?

Thanks!

Simplicity.login(Facebook()) { (accessToken, error) in
// Handle access token here
}

Present SafariView on top most viewController

Hi,

There seems to be no available way of presenting the SafariView if another viewController is already being presented.

Is that wanted or will it be changed?

Cordially, Louis.

Getting public_profile,email

Hello,

How would I go about getting public_profile and email? After I get the token I can get the "name" and "id" fields, but how would I go about getting the rest of that information?

Thank you

Create a companion server that handles authorization_code flows

We can't implement Twitter, GitHub, LinkedIn, Slack, or other login types because we can't do authorization_code grants without a client secret. Client secrets are fundamentally insecure on mobile clients, so we need to create a companion server to help with the authentication request.

Swift 3.0

Do you plan to support Swift 3.0? It's few days till Xcode 8 official release.

Extracting data out of AccessToken

Hello there,
thanks for this nice library.

The Google-Login works fine. Now I want to get the E-Mail-Information out of the AccessToken. Is this possible with your library? If not, what next step do you recommend? (For example picking up another library).

The thing is, getting the E-Mail out of access token is the only functionality I need, and using other Libs seems to be way too overkill for that.

Thanks in advance.

Carthage Compatible!

Please share the scheme and update this. Carthage is unable to build a scheme for this.

error presenting safari uiviewcontroller

Simplicity[4031:40778] Warning: Attempt to present <SFSafariViewController: 0x7fd56ae95ea0> on <faceBookAPI_2_Simplicity.ViewController: 0x7fd56ae8a120> whose view is not in the window hierarchy!

Why would I be getting this error?
Thanks in advance for your help.

Modifying autolayout from background thread

Hi, I'm getting this error when using the google login feature

This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.

I believe it is a result of using datatask in the google loginhandler.

Please checkout this stackoverflow post , I believe it could be fixed by wrapping the callback call with:

if error == nil {
    dispatch_async(dispatch_get_main_queue(), {
        self.handleRequest(...)I
    })
}

Multiple app launch

Hi, Simplicity is working great in my project but what is the preferred way to store the token after getting it ? Can you provide a tiny sample ?

Issue regarding presenting safari viewcontroller from root view controller

I have a login view controller that is presented modally which uses the simplicity. But since the root view controllers view is not currently on top of the window stack the system throws a warning that the view controller (safari) cannot be presented since the view is not visible. I did fix it. Do you mind if i issue a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.