1.0.1 • Published 2 years ago
tosidestudio-account-backend v1.0.1
Toside Studio - Account Library
Library reserved for Toside Studio projects. Developed to be integrated into projects NextJS.
Security considerations
This library has been developed to integrate only with the official Toside Studio projects. Install the library and use it in other projects download the Toside Studio from any responsibility.
Usage
The library is compatible with NextJS
Installation
npm i tosidestudio-account
Import CSS styles
This code must be insert in the file _app.js
and without the style the library can't work.
import 'tosidestudio-account/dist/style.css';
Import library
To use the method of the package import the library in the file.
import * as TosideAccount from 'tosidestudio-account'
Check login
Method to check if the user is logged or not.
if(TosideAccount.tosideLoginCheck()){
// User is logged
} else {
// User is not logged
}
Login method
To open the view with the login module call the method tosideLoginModule
TosideAccount.tosideLoginModule(secretKey)
Signup method
Call the method tosideSignupModule
to show the view with the signup module
TosideAccount.tosideSignupModule(secretKey)
Logout
TosideAccount.tosideLogout()
Get info user
TosideAccount.tosideGetInfoUser(secretKey).then(function(response){
console.log(response);
});
Credits
Barioglio Simone
License
© Toside Studio Sobe Inc. - www.tosidestudio.com