Q&A

Line (liff) login issue with default browser

Pre condition: In our web app, we need to integrate liff login. The purpose is that we could communicate with people via line app and they could message us there as well.

In order to log in with the line, we run liff.login method with the redirect URL option - {websiteUrl}/link-line/link-success.

After the user logged in with his line account, it redirects him to the URL that we specified and on the link-success page, we are able to proceed with further steps.

The issue happens with the default browser on mobile devices. Example:

  1. The user has the Safari browser as default but uses Google Chrome.
  2. He runs our website in Chrome.
  3. When it's time to redirect him, it opened the redirect URL in Safari, not Chrome (because Safari is set as default).
  4. Then if we check if the user is logged in with line - liff.isLoggedIn(), it will be false, cause the line check for their access token in cookies (as far as I found in their docs), but since we are in the different browser now, cookies are empty.

So, users who will face the case will need to log in with the line again.

Did anyone face something like this and if so, how did you resolve it?

  • 0
  • 0
  • 391
  • twitter facebook
Are you sure? question.vm