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

add digits oauth provider #2284

Merged
merged 1 commit into from
Jul 15, 2016
Merged

add digits oauth provider #2284

merged 1 commit into from
Jul 15, 2016

Conversation

ranhsd
Copy link
Contributor

@ranhsd ranhsd commented Jul 14, 2016

pull request for issue #2280

@flovilmart
Copy link
Contributor

flovilmart commented Jul 14, 2016

@ranhsd Did you try it?

@ranhsd
Copy link
Contributor Author

ranhsd commented Jul 15, 2016

Hi @flovilmart yes and it worked. In order to use it you need to specify "digits" in the provider name and send the token, secret token and digits user id.

in iOS it looks like:

    [[Digits sharedInstance] authenticateWithViewController:nil configuration:configuration completion:^(DGTSession *session, NSError *error) {
        if (error) {
            return;
        }

        [PFUser registerAuthenticationDelegate:self forAuthType:@"digits"];

        [[PFUser logInWithAuthTypeInBackground:@"digits" authData:@{@"auth_token" : session.authToken,@"auth_token_secret" : session.authTokenSecret,@"id" : session.userID}] continueWithBlock:^id _Nullable(BFTask<__kindof PFUser *> * _Nonnull task) {

            if (task.error){
                NSLog(@"error occured %@",task.error);
            }

            return nil;
        }];
    }];

@flovilmart flovilmart merged commit fcfe2a0 into parse-community:master Jul 15, 2016
@jeveloper
Copy link
Contributor

THanks for awesome work, curious if anyone uses auth0 with parse-server and what would be the better practice to make it work together.
I assume i can store anything in authData

@benitech
Copy link

benitech commented Aug 5, 2016

@ranhsd Would it be possible to also add the verified email that Digits provides from the authenticated user directly into the Parse "email verified" field?

Something similar to this - https://github.com/felix-dumit/PFUser-Digits/blob/master/user.js

@flovilmart
Copy link
Contributor

@benitech not sure we're gonna rely on those provided fields automatically as we're using those providers for identity and authentication purposes. also it's very easy to include that into a beforeSave to fill up a user's info.

@JulliardK
Copy link

Hello,

I hope I'm not a bother, I'm still learning and need some help with this.

How I went about trying to integrate digits with Parse server is this:

  1. downloaded the SDK from parse
  2. pod installed parse, fabric and digits
  3. pulled and dropped these files into my workspace: https://github.com/felix-dumit/PFUser-Digits
  4. followed the "digits for iOS" installation guide: https://fabric.io/kits/ios/digits/install

the issue i faced was shell script invocation error when i added a run script build phase which was the second step in the "digits for iOS" installation guide.

am i not getting the steps right? i'm really sorry if this is such a simple question.

_oh right, could it be that i'm writing the code in swift but the files I pulled in (_step 3*) was written in objC?

I'm really stuck, please help me out.

thank you!

rsouzas pushed a commit to back4app/parse-server that referenced this pull request Mar 15, 2017
rsouzas pushed a commit to back4app/parse-server that referenced this pull request Mar 16, 2017
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.

5 participants