After a successful login, the Line app does not redirect to my iOS app directly; instead, it goes to the WebView first
What did you do?
I have created a iOS project and followed the link https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/integrate-line-login/.
What did you expect?
Redirect the user to my iOS app without using a WebView.
What happened actually?
After the user successfully logs in, the Line app redirects the user to a web view before navigating to my iOS app.
Sample project
I used the sample project from this repository and only changed the channelID
Hi,
This is the default and expected behavior when the URL scheme is used, to improve the security of navigating. To bypass this confirm screen, you can try to setup and implement the Universal Link.
https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/universal-links-support/
If you set up a universal link, LINE tries to open your app with the universal link first. If the universal link is invalid, LINE falls back to a URL based on your iOS bundle ID.
Hi,
This is the default and expected behavior when the URL scheme is used, to improve the security of navigating. To bypass this confirm screen, you can try to setup and implement the Universal Link.
https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/universal-links-support/
If you set up a universal link, LINE tries to open your app with the universal link first. If the universal link is invalid, LINE falls back to a URL based on your iOS bundle ID.
I have followed the link that you provided; it works fine for navigating users to my iOS app. However, the Line SDK gives me an error: 'authorizeFailed(reason: LineSDK.LineSDKError.AuthorizeErrorReason.userCancelled).
Please make sure you implement the "user activity" related delegate methods in either app delegate or the scene delegate:
https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/universal-links-support/#modify-app-delegate
https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/universal-links-support/#modify-app-delegate
I already added it, but it still is not working. I got the same error 'authorizeFailed(reason: LineSDK.LineSDKError.AuthorizeErrorReason.userCancelled).'
@kanzt Sorry for the late reply.
Could you please provide a code snippet that demonstrates how you are configuring the LoginManager and the user activity (which is what the universal link triggers) delegate? Additionally, could you set a breakpoint on the userActivity-related delegate methods to verify if they are being invoked with the appropriate URL, which is then passed to the LoginManager.application(_:open:) method?
Your assistance with this additional information would be greatly appreciated. Thank you.