VITE_URL_SSO
This commit is contained in:
parent
f395d4a635
commit
4df719cbd6
4 changed files with 7 additions and 3 deletions
1
.env
Normal file
1
.env
Normal file
|
|
@ -0,0 +1 @@
|
|||
VITE_URL_SSO: "https://bma-sso.frappet.synology.me"
|
||||
|
|
@ -5,7 +5,7 @@ VITE_API_URI_CONFIG=VITE_API_URI_CONFIG
|
|||
VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL
|
||||
VITE_CLIENTSECRET_KEYCLOAK=VITE_CLIENTSECRET_KEYCLOAK
|
||||
VITE_MANUAL_URL=VITE_MANUAL_URL
|
||||
|
||||
VITE_URL_SSO: VITE_URL_SSO
|
||||
# VITE_REALM_KEYCLOAK: "bma-ehr"
|
||||
# VITE_CLIENTID_KEYCLOAK: "bma-ehr-exam-vue3"
|
||||
# VITE_URL_KEYCLOAK: "https://id.frappet.synology.me/"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ do
|
|||
sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file
|
||||
sed -i 's|VITE_CLIENTSECRET_KEYCLOAK|'${VITE_CLIENTSECRET_KEYCLOAK}'|g' $file
|
||||
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file
|
||||
sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file
|
||||
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
const ACCESS_TOKEN = "BMAHRISUSER_KEYCLOAK_IDENTITY";
|
||||
|
||||
const key_C_Config = {
|
||||
url_Logout: import.meta.env.VITE_URL_SSO,
|
||||
};
|
||||
interface AuthResponse {
|
||||
access_token: string;
|
||||
expires_in: number;
|
||||
|
|
@ -15,7 +17,7 @@ async function setAuthen(r: AuthResponse) {
|
|||
|
||||
async function logout() {
|
||||
await deleteCookie(ACCESS_TOKEN);
|
||||
window.location.href = "/login";
|
||||
window.location.href = key_C_Config.url_Logout;
|
||||
}
|
||||
|
||||
async function getToken() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue