Create and initialize a Openlogin instance
This is the main class of anything related to Openlogin Using ES6,
Then, create a new instance of OpenLogin.
The OpenLogin constructor takes an object with
OpenLoginOptions as input.
OpenLoginOptions: The options of the constructor
string: Your project id which you can get from developer dashboard
enum: Environment to run openlogin (testnet, mainnet, development)
string: Url of openlogin iframeUrl, you can pass custom iframe url here else it will be added based on network value.For testnet iframe url is
https://beta.openlogin.comand for mainnet it is
https://manage.openlogin.com. If you are passing valid network value then network value will be given precedence over iframe url.
redirectuxmode are supported. By default it is set to
Object: The openlogin instance with all its methods and events.
Initialize the OpenLogin object after creation. Init sync up the state of user login session in to openlogin class and it also injects a iframe in to DOM. If init will be called after user is logged in , it will add the user private key to privKey state variable of openlogin object.
Promise<void>: Returns a promise which resolves to void