2017-04-13 6 views
0

FirebaseのLinkedinログインに問題があります。 私はfirebaseでカスタムトークンのログインを使用して、私はLinkedInのから取得したトークンを持っていますが、私が呼び出した場合Firebase 3:Firebase SDK 3.xリンクされたログイン

FIRAuth.auth()?.signIn(withCustomToken: my_token) { (user, error) in

私はエラーを取得する:

Error Domain=FIRAuthErrorDomain Code=17000 "The custom token format is incorrect. Please check the documentation." UserInfo={NSLocalizedDescription=The custom token format is incorrect. Please check the documentation., error_name=ERROR_INVALID_CUSTOM_TOKEN}

しかし、 LISDKSessionManagerで作成されたセッションからトークンを取得します。

ここに私の完全な機能:

LISDKSessionManager.createSession(withAuth: [LISDK_BASIC_PROFILE_PERMISSION,LISDK_EMAILADDRESS_PERMISSION], state: nil, showGoToAppStoreDialog: true, successBlock: { (returnState) -> Void in 
     guard let session = LISDKSessionManager.sharedInstance().session else { return } 
     FIRAuth.auth()?.signIn(withCustomToken: session.accessToken.accessTokenValue) { (user, error) in 
      //here I get the error 
     } 
    }) 

答えて

関連する問題