authly-me 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2,12 +2,17 @@ const axios = require('axios');
2
2
 
3
3
  class Authly {
4
4
 
5
- constructor(key, options={}) {
5
+ constructor(server_url, key, options={}) {
6
+
7
+ if (!server_url) {
8
+ throw new Error('Server is required');
9
+ }
10
+
6
11
  if (!key) {
7
12
  throw new Error('Key is required');
8
13
  }
9
14
  this.key = key;
10
- this.server_url = options?.server_url ?? 'http://localhost:4000/api';
15
+ this.server_url = server_url;
11
16
  this.callback_url = options?.callback_url ?? null;
12
17
  }
13
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authly-me",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"