-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add uniresolver && update policies
- Loading branch information
1 parent
453339f
commit 0413ca6
Showing
8 changed files
with
55 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
window.addEventListener("load", function () { | ||
const base_url: string = window.location.origin; | ||
const base_url: string = window.location.origin | ||
|
||
const login_button: HTMLButtonElement = document.createElement('button'); | ||
login_button.innerHTML = 'Log in'; | ||
login_button.classList.add('btn', 'authorize'); | ||
const login_button: HTMLButtonElement = document.createElement('button') | ||
login_button.innerHTML = 'Log in' | ||
login_button.classList.add('btn', 'authorize') | ||
login_button.onclick = function () { | ||
window.location.href = base_url + '/logto/sign-in'; | ||
}; | ||
window.location.href = base_url + '/logto/sign-in' | ||
} | ||
|
||
const user_button: HTMLButtonElement = document.createElement('button'); | ||
user_button.innerHTML = 'User info'; | ||
user_button.classList.add('btn', 'authorize'); | ||
const user_button: HTMLButtonElement = document.createElement('button') | ||
user_button.innerHTML = 'User info' | ||
user_button.classList.add('btn', 'authorize') | ||
user_button.onclick = function () { | ||
window.location.href = base_url + '/user'; | ||
}; | ||
window.location.href = base_url + '/user' | ||
} | ||
|
||
const logout_button: HTMLButtonElement = document.createElement('button'); | ||
logout_button.innerHTML = 'Log out'; | ||
logout_button.classList.add('btn', 'authorize'); | ||
const logout_button: HTMLButtonElement = document.createElement('button') | ||
logout_button.innerHTML = 'Log out' | ||
logout_button.classList.add('btn', 'authorize') | ||
logout_button.onclick = function () { | ||
window.location.href = base_url + '/logto/sign-out'; | ||
}; | ||
window.location.href = base_url + '/logto/sign-out' | ||
} | ||
|
||
const auth_pan: Element = document.getElementsByClassName('auth-wrapper')[0]; | ||
auth_pan.appendChild(login_button); | ||
auth_pan.appendChild(user_button); | ||
auth_pan.appendChild(logout_button); | ||
}); | ||
const auth_pan: Element = document.getElementsByClassName('auth-wrapper')[0] | ||
auth_pan.appendChild(login_button) | ||
auth_pan.appendChild(user_button) | ||
auth_pan.appendChild(logout_button) | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters