Skip to content

feat(provider): add LINE Login provider#2578

Open
sukekyo000 wants to merge 1 commit into
supabase:masterfrom
sukekyo000:feat/add-provider-line
Open

feat(provider): add LINE Login provider#2578
sukekyo000 wants to merge 1 commit into
supabase:masterfrom
sukekyo000:feat/add-provider-line

Conversation

@sukekyo000

Copy link
Copy Markdown

Add LINE Login as an external OAuth provider. The user's profile (name, picture) and email are returned as claims in the OIDC ID token, so the provider reads them directly from the ID token instead of calling a separate userinfo endpoint.

Although LINE exposes an OIDC discovery document, it does not sign the ID token with the ES256/JWKS keys it advertises; it signs with HS256 using the channel secret. The ID token is therefore verified with the channel secret (HS256), validating the issuer (https://access.line.me), audience (channel ID) and expiry.

Web (authorization-code) flow only; native id_token sign-in is out of scope.

What kind of change does this PR introduce?

Feature — adds a new external authentication provider (line).

What is the current behavior?

There is no built-in LINE Login provider. Users who want "Sign in with LINE" have to build a custom workaround outside of Auth.

Related requests / tracking:

LINE is a primary login method in Japan (~95M MAU), Taiwan (~21M) and Thailand (~51M), so this fills a real gap for those markets.

What is the new behavior?

  • Adds a line external provider using LINE Login v2.1 (web authorization-code flow).
  • On callback, exchanges the authorization code and reads the OIDC id_token from the token response.
  • Verifies the id_token with HS256 using the channel secret (requiring an HMAC signing method), and validates the issuer (https://access.line.me), audience (channel ID) and expiry.
  • Maps the sub, name, picture, and email claims into the user's identity/metadata — no separate userinfo request.
  • The email claim is only present once the user grants the email permission (LINE returns only verified emails); its absence is handled gracefully.
  • Configured via the standard GOTRUE_EXTERNAL_LINE_* settings (client id = channel ID, secret = channel secret).

Additional context

Add LINE Login as an external OAuth provider. The user's profile (name, picture) and email are returned as claims in the OIDC ID token, so the provider reads them directly from the ID token instead of calling a separate userinfo endpoint.

Although LINE exposes an OIDC discovery document, it does not sign the ID token with the ES256/JWKS keys it advertises; it signs with HS256 using the channel secret. The ID token is therefore verified with the channel secret (HS256), validating the issuer (https://access.line.me), audience (channel ID) and expiry.

Web (authorization-code) flow only; native id_token sign-in is out of scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant