Constructors

  • Parameters

    • __namedParameters: {
          appId: string;
          appKey: string;
      }
      • appId: string
      • appKey: string

    Returns WepinLogin

Properties

appEmailVerified: boolean
appId: string
language: string
type: "web" | "android" | "ios"
version: string
webviewEventHandler: WebviewEventHandler = ...
widget: Widget

Methods

  • change language

    Parameters

    • language: string

      string <'ko' | 'en' | 'ja'> - The language to be displayed on the widget.

    Returns void

    void

  • Finalize wepin login module.

    Returns void

  • This method retrieves the current logged-in user's information from the Wepin.

    Returns Promise<IWepinUser>

  • This method retrieves the current firebase token's information from the Wepin.

    Parameters

    • OptionalprevFBToken: LoginResult

      LoginResult - provider 'email'|'apple'|'google'|'discord'|'naver'|'external_token' - token {idToken: string, refreshToken: string}. this value is response of @wepin/login-js

    Returns Promise<LoginResult>

  • Initialize Wepin Login Object.

    Parameters

    • Optionallanguage: string

      string <'ko' | 'en' | 'ja'> - The language to be displayed on the widget.>

    Returns Promise<void>

  • Check if wepin is initialized.

    Returns boolean

    boolean

  • Returns the user's login information. This method with the same as loginWithUI() of WepinSDK module, but it doesn't show the widget.

    Additionally, the parameters for this method should utilize the return values from the loginWithOauthProvider(), loginWithEmailAndPassword(), loginWithIdToken(), and loginWithAccessToken() methods.

    Parameters

    • __namedParameters: {
          provider: string;
          token: {
              idToken: string;
              refreshToken: string;
          };
      }
      • provider: string
      • token: {
            idToken: string;
            refreshToken: string;
        }
        • idToken: string
        • refreshToken: string

    Returns Promise<IWepinUser>

    import { WepinLogin } from '@wepin/login-js'
    const wepinLogin = WepinLogin({ appId: 'appId', appKey: 'appKey' })
    const res = await wepinLogin.loginWithOauthProvider({ provider: 'google' })
    wepinLogin.loginWepin(res).then((userInfo) => {
    console.log(userInfo)
  • It logs in to the Wepin firebase with your email and password. Returns firebase login info upon successful login.

    Parameters

    • email: string

      User email

    • password: string

      User password

    Returns Promise<LoginResult>

  • A new window will open and proceed to log in to Wepin Firebase. Returns Firebase login info upon successful login. If the response contains an error value of required/register_email, you need to register an email and request email verification using the sendVerifyEmail method.

    Parameters

    • params: ILoginOauth2Params

      {provider: string, withLogout?: boolean} - provider accepts one of the following values: 'google', 'naver', 'discord', 'apple', 'line', 'facebook'

    Returns Promise<LoginResult | LoginErrorResult>

  • Returns Promise<boolean>

  • Method for registering an email and requesting email verification. If a required/register_email error occurs, you need to register an email and request email verification. Once email verification is complete, you should use the loginWithAccessToken or loginWithIdToken method to log in again with the AccessToken or IdToken used for the initial login.

    Parameters

    • params: ISendVerifyEmailParams

      { email: string, provider: LoginProviders, idToken?: string, accessToken?: string } - The provider accepts one of the following values: 'google', 'naver', 'discord', 'apple', 'line', 'facebook'

    Returns Promise<boolean>

  • It signs up on the wepin firebase with your email and password. Returns firebase login info upon successful login.

    Parameters

    • email: string

      User email

    • password: string

      User password

    • OptionalopenWepinWallet: boolean

    Returns Promise<LoginResult>