authly-me 1.0.2 → 1.0.3
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.
- package/index.js +7 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -33,7 +33,7 @@ class Authly {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// Generate App Auth Link
|
|
36
|
-
async generateAuthLink() {
|
|
36
|
+
async generateAuthLink(callback_metadata = null) {
|
|
37
37
|
|
|
38
38
|
const headers = this.getHeaders();
|
|
39
39
|
|
|
@@ -41,6 +41,12 @@ class Authly {
|
|
|
41
41
|
if (this.callback_url) {
|
|
42
42
|
payload.callback_url = this.callback_url;
|
|
43
43
|
}
|
|
44
|
+
if (callback_metadata) {
|
|
45
|
+
if (typeof callback_metadata !== 'object') {
|
|
46
|
+
throw new Error('callback_metadata should be an object');
|
|
47
|
+
}
|
|
48
|
+
payload.callback_metadata = callback_metadata;
|
|
49
|
+
}
|
|
44
50
|
|
|
45
51
|
let response;
|
|
46
52
|
try {
|