Sign up/Login Library

A library for securely storing and retrieving user credentials from JSONBin

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/470767/1219648/Sign%20upLogin%20%20Library.js

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
GamingwithMacon
版本
1
创建于
2023-07-13
更新于
2023-07-13
大小
3.9 KB
许可证
暂无

Signup/Login Library Documentation

Signup/Login Library Documentation

Description

The Signup/Login Library is a user script library that provides functionality for retrieving and saving user credentials using JSONBin.io. It can be used in conjunction with other user scripts to provide login and signup functionality.

Installation

To use the Signup/Login Library in your user scripts, you will need to include the following line in the metadata block at the top of your script:

// @require https://greasyfork.org/scripts/470767-sign-up-login-library/code/Sign%20upLogin%20%20Library.js

Usage

To use the Signup/Login Library in your user scripts, you will need to create a new instance of the LoginLibrary class and call its methods as needed.

Retrieving User Credentials

To retrieve user credentials from JSONBin.io, you can call the retrieveUserCredentials() method of the LoginLibrary class. This method will make a GET request to the JSONBin.io API and retrieve the user credentials.

Example:

const loginLibrary = new LoginLibrary();
loginLibrary.retrieveUserCredentials();

Saving User Credentials

To save user credentials to JSONBin.io, you can call the saveUserCredentials() method of the LoginLibrary class. This method will make a PUT request to the JSONBin.io API and save the user credentials.

Example:

const loginLibrary = new LoginLibrary();
loginLibrary.saveUserCredentials(username, password);

API Key

To use the Signup/Login Library, you will need to provide your JSONBin.io API key. You can do this by setting the binId and accessKey variables in the LoginLibrary class.

Example:

const binId = 'YOUR_BIN_ID_HERE';
const accessKey = 'YOUR_ACCESS_KEY_HERE';
const loginLibrary = new LoginLibrary(binId, accessKey);

You can find your JSONBin.io API key by logging into your account and navigating to the API keys page.