![]() ![]() To do this, create a static variable of a lineApiClient object and initialize the variable.Ĭreate a static variable of the object to call various methods.Read Live delivers measurable results for struggling and developing readers of all ages. Use the SDK by calling the methods of the LineApiClient interface. Learn more about what APIs to call from your backend on these pages: Learn more about access tokens from Get the access token. The server should then use this to securely verify the user's identity against LINE's server. But instead of sending that information from the client to your server directly, the client should send an access token. Typically, a back-end server verifies a user's identity based on a user ID, display name, or some other LINE account property. Instead, the client should send the server an access token, and the server should use the token to retrieve user data. ![]() A malicious client can send an arbitrary user ID or malformed information to your server to impersonate a user. As shown in the example above, you can retrieve the access token using the following code.ĭo not trust user IDs, or other information available in the LineProfile object, when sent by a client to your backend server. The login result contains a LineCredential() object which contains the user’s access token. addLoginListener ( new LoginListener ( ) # Get the access token nonce("") // nonce can be used to improve security. setAuthenticationParams ( new LineAuthenticationParams. enableLineAppAuthentication ( true ) // set up required scopes and nonce. toString ( ) ) // configure whether login process should be done by Line App, or inside WebView. line_login_btn ) // if the button is inside a Fragment, this function should be called. create ( ) LoginButton loginButton = rootView. private LoginDelegate loginDelegate = LoginDelegate. Arrays // A delegate for delegating the login result to the internal login handler. You can add a login button to the user interface of your app to provide your users with a quick way to log in as below:Īdd the login button in your layout XML file. The LINE SDK provides a pre-defined login button. # Use the LINE SDK's built-in login button Use the LINE SDK's built-in login button.To let the user log in to your Android app, you can create a LINE-branded login button to take the user through the authentication and authorization process. Custom URL scheme used to launch your app. You can set multiple signatures by entering each one on a new line. Application's package name used to launch the Google Play store. Linking your app to a LINE Login channel, enable Mobile app on the LINE Login tab of your channel settings on the LINE Developers Console and complete these fields. Make sure the launch mode of the activity that is making the login call is not set to singleInstance as that may prevent the activity from receiving the onActivityResult callback. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |