1.0.2 • Published 24 days ago

expo-line-login v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
24 days ago

Expo Line Login

Installation

npx expo install expo-line-login

Prerequisites

  • Please create a Line Login channel and get the channel ID from Line Developer Console.
  • Please add your app schema and package name into the "App settings" fields in the "LINE Login" section of the Line Developer Console.
  • Please add the following config in your app.json
{
  "expo": {
    "plugins": [
      [
        "expo-line-login", {
          "channelId": "YOUR_CHANNEL_ID", // repleace with your channel ID
        }
      ]
    ]
  }
}

Usage

Login

import { 
  login,
  LoginPermission,
  BotPrompt,
} from 'expo-line-login';

const result = await login({
  [
    LoginPermission.PROFILE,
    LoginPermission.OPEN_ID,
    LoginPermission.EMAIL,
  ],
  BotPrompt.NORMAL,
});
console.log(result);

Get Profile

import { getProfile } from 'expo-line-login';

const profile = await getProfile();
console.log(profile);

Logout

import { logout } from 'expo-line-login';

await logout();

Get Access Token

import { getAccessToken } from 'expo-line-login';

const accessToken = await getAccessToken();
console.log(accessToken);

Get Friendship Status

import { lineGetBotFriendshipStatus } from 'expo-line-login';

const friendshipStatus = await lineGetBotFriendshipStatus();
console.log(friendshipStatus);
1.0.2

24 days ago

1.0.1

2 months ago

1.0.0

4 months ago

0.2.0

5 months ago

0.1.0

5 months ago