1.0.27 • Published 1 month ago

rtp-ksk-sdk v1.0.27

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
1 month ago

rtp-sdk

rtp-sdk is a JavaScript library designed to provide an easy-to-use interface for handling sign-up and sign-in processes, along with establishing necessary listeners for authentication events.

Installation

Install rtp-sdk using npm:

npm install rtp-sdk

Basic Usage

Initialization

To start using the library, first obtain an instance of RTPSDK:

import RTPSDK from 'rtp-sdk';

function App() {
  const rtp = RTPSDK.getInstance();
  // ... additional code ...
}

Available Methods

handleSignUp()

Initiates the sign-up process with an optional userId. If userId is not provided, it will be generated automatically. This method sets up listeners and handles the communication for user registration.

Example of use:

rtp.handleSignUp('yourUserId');

If you want to generate a userId automatically:

rtp.handleSignUp();

handleSignIn(userId)

Initiates the sign-in process with an optional userId. Similar to handleSignUp, if userId is not provided, it will be generated automatically. This method sets up listeners and handles the communication for user login.

Example of use:

rtp.handleSignIn('yourUserId');

If you want to generate a userId automatically:

rtp.handleSignIn();

Configuration

Ensure you have the following environment variable configured:

REACT_APP_AUTH_SITE: This should be set to the URL of the authentication site.
1.0.2

1 month ago

1.0.18

1 month ago

1.0.17

1 month ago

1.0.16

1 month ago

1.0.9

1 month ago

1.0.8

1 month ago

1.0.7

1 month ago

1.0.6

1 month ago

1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.22

1 month ago

1.0.21

1 month ago

1.0.20

1 month ago

1.0.26

1 month ago

1.0.25

1 month ago

1.0.24

1 month ago

1.0.23

1 month ago

1.0.27

1 month ago

1.0.11

1 month ago

1.0.10

1 month ago

1.0.15

1 month ago

1.0.14

1 month ago

1.0.13

1 month ago

1.0.12

1 month ago

1.0.1

2 months ago

1.0.0

4 months ago