Angopapo / Parse-Server-phone-number-auth

An module to login users in parse server with phone numbers using AccountKit.
Eclipse Public License 1.0
17 stars 2 forks source link

Error iOS #1

Open antgar opened 7 years ago

antgar commented 7 years ago

ssue Description

When trying to implement custom OAuth module I have this error :"message: 'This authentication method is unsupported.' } code=252, message=This authentication method is unsupported."

Steps to reproduce

Installing "https://github.com/Angopapo/Parse-Server-phone-number-auth" and initialize custom Auth in Parse-server Constructor like this auth: { accountkit: { module: 'Parse-Server-phone-number-auth', appSecret: '7ea98f46b1186c436bc114e09c46dae6' }, facebook: { appIds: "522186534630612" } },

Expected Results

Login working

Actual Outcome

Error code 252.

Environment Setup

Server parse-server version 2.3.5 Localhost or remote server? Heroku Localhost or remote server? mLab Logs/Trace

"authData": { "accountKit": { "id": "blabla", "access_token": "blabla" } }

Thank you for your help

maravilhosinga commented 7 years ago

Hello, once you have your Account Kit App Secret in Parse Server, you must be sure to use the right Account Kit Client Token in your android inside.

Also make sure to use this config

Allow Email Login NO Allow SMS Login YES Enable Client Access Token Flow YES Require App Secret NO

Try and tell me if its works. Don't forget to restart or reload your Parse Server.

antgar commented 7 years ago

Hi,

Thank you for you answer. It's not Android but iOS (Swift). I'm doing this

let authData = ["access_token":accessToken.tokenString,"id":accessToken.accountID] PFUser.logInWithAuthTypeInBackground("accountkit", authData: authData)

But it returns me : 'This authentication method is unsupported.'

I have made the modification to use the configuration you have told me.

Not sure if it's a client problem or a server problem.

In my server it's like this

auth: { accountkit: { module: 'Parse-Server-phone-number-auth', appSecret: 'APP_SECRET' }, facebook: { appIds: "522186534630612" } },

maravilhosinga commented 7 years ago

Did you install the dependency via npm ?

$ npm install -S Parse-Server-phone-number-auth

mursang commented 6 years ago

I'm getting the same error. Any solution?

bnap00 commented 6 years ago

I found the solution to this problem, https://www.bountysource.com/issues/40726641-login-to-parse-using-facebook-s-account-kit-this-authentication-method-is-unsupported-code-252-version-1-14-2

but i have another issue now, It says Uncaught internal server error. ParseError { code: 101, message: 'AccountKit auth is invalid for this user.'

mursang commented 6 years ago

I just uninstalled this module, and updated to the latest version of Parse Server that now supports account kit by doing nothing! (https://github.com/parse-community/parse-server/releases/tag/2.7.3)

kibukamusoke commented 6 years ago

Using inbuilt facebookaccountkit auth is much easier. thanks to thisGuy

add this to your parse config:

auth: { facebookaccountkit: { appSecret: '56f495d2646f3d774798022e9511392', // optional appIds: ["67045654045386"] } },