line / line-sdk-starter-ios-v2

A starter application that demonstrates how to use LINE SDK for iOS.
MIT License
27 stars 9 forks source link

LineSDKInternalErrorDomain Code=1 "Invalid state transition. (Get AccessToken) to (Get RequestToken)" #25

Open ivanz1234 opened 5 years ago

ivanz1234 commented 5 years ago

I login with Line SDK like this [[LineSDKLogin sharedInstance] startLoginWithPermissions:@[@"profile"]]; Then my App jumps to LINE APP. After authorizing from LINE APP, jumped back to my APP and LineSDK return an error in delegate didLogin: LineSDKInternalErrorDomain Code=1 "Invalid state transition. (Get AccessToken) to (Get RequestToken) What should I do to solve that?

ivanz1234 commented 5 years ago

Dear @mrmaakun, I have LineSDK version 4.1.1, and my channel has been published. My bundle ID and iOS Scheme are all in right format. Why the SDK still return this error?

ivanz1234 commented 5 years ago

The problem solved, the reason is that when jump back from LINE app, the url from appdelegate was handled twice, which cause this error.

ivanz1234 commented 5 years ago

Other Login SDK like facebook and kakao all perform normal for handling twice, I hope LineSDK can solve this problem.