Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bertrandom/eo-auth
Generates and stores an access token for the Electric Objects API using your login credentials
https://github.com/bertrandom/eo-auth
Last synced: about 1 month ago
JSON representation
Generates and stores an access token for the Electric Objects API using your login credentials
- Host: GitHub
- URL: https://github.com/bertrandom/eo-auth
- Owner: bertrandom
- License: isc
- Created: 2021-11-23T05:45:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-23T05:51:33.000Z (about 3 years ago)
- Last Synced: 2024-11-10T06:43:54.699Z (2 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eo-auth
Generates and stores an access token for the Electric Objects API using your login credentials. Automatically handles refreshing the token when it expires.
## Usage
Install globally:
```
npm install -g eo-auth
```and then run:
```
eo-auth configure
```You will be prompted for your login credentials. If login is successful, it will store your login credentials and tokens in:
```
~/.eo-auth/
```You can retrieve the current access token via the CLI by running:
```
eo-auth token
```It will automatically be refreshed if it is expired.
You may also retrieve the token programmatically from another node app by writing:
```
var eoAuth = require('eo-auth');
var accessToken = await eoAuth.getAccessToken();
```If you'd like to erase the stored tokens and credentials:
```
eo-auth reset
```or remove the directory:
```
~/.eo-auth/
```You can also debug the stored tokens and credentials with:
```
eo-auth status
```If your password has been stored, it will be obfuscated, but the access and refresh tokens will be displayed.
## License
ISC