casdoor-js-sdk
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -6,2 +6,3 @@ export interface sdkConfig { | ||
organizationName: string; | ||
redirectPath: string; | ||
} | ||
@@ -8,0 +9,0 @@ export interface account { |
@@ -19,2 +19,5 @@ "use strict"; | ||
this.config = config; | ||
if (config.redirectPath === undefined || config.redirectPath === null) { | ||
this.config.redirectPath = "/callback"; | ||
} | ||
} | ||
@@ -30,3 +33,3 @@ getSignupUrl(enablePassword = true) { | ||
getSigninUrl() { | ||
const redirectUri = `${window.location.origin}/callback`; | ||
const redirectUri = `${window.location.origin}${this.config.redirectPath}`; | ||
const scope = "read"; | ||
@@ -33,0 +36,0 @@ const state = this.config.appName; |
@@ -6,2 +6,3 @@ export interface sdkConfig { | ||
organizationName: string; | ||
redirectPath: string; | ||
} | ||
@@ -8,0 +9,0 @@ export interface account { |
@@ -17,2 +17,5 @@ // Copyright 2021 The casbin Authors. All Rights Reserved. | ||
this.config = config; | ||
if (config.redirectPath === undefined || config.redirectPath === null) { | ||
this.config.redirectPath = "/callback"; | ||
} | ||
} | ||
@@ -28,3 +31,3 @@ getSignupUrl(enablePassword = true) { | ||
getSigninUrl() { | ||
const redirectUri = `${window.location.origin}/callback`; | ||
const redirectUri = `${window.location.origin}${this.config.redirectPath}`; | ||
const scope = "read"; | ||
@@ -31,0 +34,0 @@ const state = this.config.appName; |
{ | ||
"name": "casdoor-js-sdk", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Javascript client SDK for Casdoor", | ||
@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20584
216