feat(WEB-132): add seamless login flow
This commit is contained in:
6
auth.ts
6
auth.ts
@@ -85,8 +85,10 @@ export const config = {
|
||||
// Assume absolute URL
|
||||
try {
|
||||
const parsedUrl = new URL(url)
|
||||
if (parsedUrl.hostname.endsWith(".scandichotels.com")) {
|
||||
// Allows **.scandichotels.com
|
||||
if (
|
||||
/\.scandichotels\.(dk|de|com|fi|no|se)$/.test(parsedUrl.hostname)
|
||||
) {
|
||||
// Allows any subdomains on all top level domains above
|
||||
return url
|
||||
} else if (parsedUrl.origin === baseUrl) {
|
||||
// Allows callback URLs on the same origin
|
||||
|
||||
Reference in New Issue
Block a user