line-sdk-starter-ios-v2 icon indicating copy to clipboard operation
line-sdk-starter-ios-v2 copied to clipboard

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

Open ivanz1234 opened this issue 5 years ago • 3 comments

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 avatar Mar 13 '19 08:03 ivanz1234

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 avatar Mar 14 '19 05:03 ivanz1234

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 avatar Mar 14 '19 11:03 ivanz1234

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

ivanz1234 avatar Mar 14 '19 11:03 ivanz1234