mirror of
https://github.com/20kaushik02/spotify-manager-web.git
synced 2025-12-06 07:54:07 +00:00
mmmm
This commit is contained in:
parent
47eb312ba1
commit
a7df0b4d30
@ -1,8 +1,10 @@
|
||||
export const backendDomain = process.env.REACT_APP_API_BASE_URL + "/";
|
||||
export const spotifyPlaylistLinkPrefix = "https://open.spotify.com/playlist/";
|
||||
|
||||
export const authLoginURL = backendDomain + "api/auth/login";
|
||||
export const authLogoutURL = backendDomain + "api/auth/logout";
|
||||
export const authLoginURL = "api/auth/login";
|
||||
export const authLoginFullURL = backendDomain + authLoginURL;
|
||||
export const authLogoutURL = "api/auth/logout";
|
||||
export const authLogoutFullURL = backendDomain + authLogoutURL;
|
||||
|
||||
export const authHealthCheckURL = "auth-health";
|
||||
export const authRefreshURL = "api/auth/refresh";
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import React, { useEffect } from "react";
|
||||
import styles from "./Login.module.css";
|
||||
import { authLoginURL } from "../../api/paths";
|
||||
import { authLoginFullURL } from "../../api/paths";
|
||||
|
||||
// auth through backend
|
||||
const Login = () => {
|
||||
useEffect(() => {
|
||||
const timeoutID = setTimeout(() => {
|
||||
window.open(authLoginURL, "_self");
|
||||
window.open(authLoginFullURL, "_self");
|
||||
}, 1000);
|
||||
|
||||
return () => clearTimeout(timeoutID);
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import React, { useEffect } from "react";
|
||||
import styles from "./Logout.module.css";
|
||||
import { authLogoutURL } from "../../api/paths";
|
||||
import { authLogoutFullURL } from "../../api/paths";
|
||||
|
||||
const Logout = () => {
|
||||
useEffect(() => {
|
||||
const timeoutID = setTimeout(() => {
|
||||
window.open(authLogoutURL, "_self");
|
||||
window.open(authLogoutFullURL, "_self");
|
||||
}, 1000);
|
||||
|
||||
return () => clearTimeout(timeoutID);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user