line / flutter_line_sdk

A Flutter plugin that lets developers access LINE's native SDKs in Flutter apps with Dart.
https://developers.line.biz/
Apache License 2.0
213 stars 42 forks source link

[iOS] Login line account auto switch from line app to line web #90

Open tuyen3962 opened 9 months ago

tuyen3962 commented 9 months ago

Is it a security issue?

If you believe you have discovered a vulnerability or have an issue related to security, please DO NOT open a public issue. Instead, send us a mail to dl_oss_dev@linecorp.com.

What did you do?

When I login line in iOS, my device has installed the Line app but still not login account. The issue is that when navigate from my app to the line app for starting login line account, it automatically switches from line app to the web line for login. I have setup onlyWebLogin variable false but not work.

What did you expect?

When I setup onlyWebLogin variable as false, it will not automatically switch from Line app to web Line.

What happened actually?

Auto navigate to web Line while line app is installed

Your environment?

flutter 3.3.9 flutter_line_sdk: 2.3.5

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.3.9, on macOS 12.6.2 21G320 darwin-arm, locale en-VN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] VS Code (version 1.74.3) [✓] Connected device (4 available) [✓] HTTP Host Availability

onevcat commented 9 months ago

Usually, if your channel app is still under development, this means you are not adding your LINE account as a testing account to your app. Please check and confirm the Developer Console and add your account in the tester list.

tuyen3962 commented 9 months ago

can you explain more detail about the tester list and testing account?

onevcat commented 9 months ago

You can find the related setting in the LINE Developer Console (login from https://developers.line.biz/), check your channel and invite the LINE account to the tester list.

截屏2023-12-05 13 18 45

For more, please also check this documentation: https://developers.line.biz/en/docs/line-developers-console/managing-roles/#roles-for-provider

tuyen3962 commented 9 months ago

But when i use the other user line account in iOs, is it necessary for this step?

onevcat commented 9 months ago

Only users on this list are allowed to use your channel while it is under development. After you mark the channel to be published, all LINE users can login to your channel.

tuyen3962 commented 9 months ago

My channel has been published. But the issue still be here and only happen in iOS when user has not login account in Line app

onevcat commented 9 months ago

If the user does not yet log in the LINE iOS app, then it is the expected behavior: LINE app recognize the auth request from the LINE SDK and try to read the login status from itself. If not yet login, then it goes to an error handling process since no login user yet there in LINE.

tuyen3962 commented 9 months ago

That's right. Like the android, when navigate to line app for login, i can handle action in app. No need switch to web app

onevcat commented 9 months ago

@tuyen3962 Ummm, thanks for the explanation.

I will record this and start a discussion with the team to see if we can improve it. But since it is already a long-lasting LINE iOS app behavior and not directly involved with LINE SDK side, it may take a while before a decision can be finally made. Let me try!