|
|
@@ -1,5 +1,5 @@ |
|
|
|
import win from "core/window" |
|
|
|
import { btoa } from "core/utils" |
|
|
|
import { btoa, sanitizeUrl } from "core/utils" |
|
|
|
|
|
|
|
export default function authorize ( { auth, authActions, errActions, configs, authConfigs={} } ) { |
|
|
|
let { schema, scopes, name, clientId } = auth |
|
|
@@ -74,8 +74,9 @@ export default function authorize ( { auth, authActions, errActions, configs, au |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let authorizationUrl = schema.get("authorizationUrl") |
|
|
|
let url = [authorizationUrl, query.join("&")].join(authorizationUrl.indexOf("?") === -1 ? "?" : "&") |
|
|
|
const authorizationUrl = schema.get("authorizationUrl") |
|
|
|
const sanitizedAuthorizationUrl = sanitizeUrl(authorizationUrl) |
|
|
|
let url = [sanitizedAuthorizationUrl, query.join("&")].join(authorizationUrl.indexOf("?") === -1 ? "?" : "&") |
|
|
|
|
|
|
|
// pass action authorizeOauth2 and authentication data through window |
|
|
|
// to authorize with oauth2 |
|
|
|