UniWebViewAuthenticationFlowLine

Summary

A predefined authentication flow for LINE.

This implementation follows the flow described hereopen in new window.

LINE authentication flow is a bit different from the other standard authentication flows. Please read the link above carefully to understand it.

See the OAuth 2.0 Support for a more detailed guide of authentication in UniWebView.

To allow the Google flow working, at least you need these steps:

  1. Setting Client Id (Channel Id), iOS Bundle Id and Android Package Name in the UniWebViewAuthenticationFlowLine inspector.
  2. Setting Scope and at least contains profile in the UniWebViewAuthenticationFlowLine inspector.
  3. Check the "Support LINE Login" option in the UniWebView preference panel.

Properties Summary

The client ID (Channel ID) of your LINE Login application.

The iOS bundle Id you set in LINE developer console.

The Android package name you set in LINE developer console.

The scope of your LINE application.

Optional to control this flow's behaviour.

Whether to enable PKCE when performing authentication.

Events Summary

Called when the authentication flow succeeds and a valid token is generated.

Called when any error (including user cancellation) happens during the authentication flow.

Methods Summary

Starts the authentication flow with the standard OAuth 2.

Properties

The client ID (Channel ID) of your LINE Login application.

The iOS bundle Id you set in LINE developer console.

The Android package name you set in LINE developer console.

The scope of your LINE application.

Optional to control this flow's behaviour.

Whether to enable PKCE when performing authentication. Default is S256.

Events

Called when the authentication flow succeeds and a valid token is generated.

Example

lineFlow.OnAuthenticationFinished.AddListener(OnLineTokenReceived)

void OnLineTokenReceived(UniWebViewAuthenticationLineToken token) {
  Debug.Log("Line Access Token: " + token.AccessToken);
}

Called when any error (including user cancellation) happens during the authentication flow.

Example

lineFlow.OnAuthenticationErrored.AddListener(OnLineAuthError);

void OnLineAuthError(long error, string message) {
  Debug.Log("Error code: " + error + " Message: " + message);
}

Methods

Starts the authentication flow with the standard OAuth 2.0. This implements the abstract method in UniWebViewAuthenticationCommonFlow.