line / line-liff-v2-starter

This is a small web application that demonstrates the basic functionality of the LINE Front-end Framework (LIFF).
Apache License 2.0
336 stars 374 forks source link

LIFF JavaScript SDK - login parameter redirectUri not working #66

Open terrylinooo opened 2 years ago

terrylinooo commented 2 years ago

LIFF JavaScript SDK - login parameter redirectUri not working as expected.

Everytime I set the redirectUri always get liff.isLoggedIn() returned false.

The endpoint is the website's domain, ex, https://www.example.com The redirectUri I set is at the same dmain but a path, ex, https://www.example.com/checkout/

Describe the bug

Not working.

liff.login({
   redirectUri: window.location.href,
});

Working

liff.login();

// or

liff.login({
   redirectUri: `100% fit to the the endpoint URL`,
});

Expected behavior The login status is supposed to be true after redirecting back to the website.

Desktop (please complete the following information):