mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: use GET for refresh_tokens
This commit is contained in:
parent
0add94c6a5
commit
a130596dda
2 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ from src.security.auth import AuthJWT, authenticate_user
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
|
|
||||||
@router.post("/refresh")
|
@router.get("/refresh")
|
||||||
def refresh(response: Response, Authorize: AuthJWT = Depends()):
|
def refresh(response: Response, Authorize: AuthJWT = Depends()):
|
||||||
"""
|
"""
|
||||||
The jwt_refresh_token_required() function insures a valid refresh
|
The jwt_refresh_token_required() function insures a valid refresh
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ export async function getUserSession(token: string): Promise<any> {
|
||||||
|
|
||||||
export async function getNewAccessTokenUsingRefreshToken(): Promise<any> {
|
export async function getNewAccessTokenUsingRefreshToken(): Promise<any> {
|
||||||
const requestOptions: any = {
|
const requestOptions: any = {
|
||||||
method: "POST",
|
method: "GET",
|
||||||
redirect: "follow",
|
redirect: "follow",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
};
|
};
|
||||||
|
|
@ -94,7 +94,7 @@ export async function getNewAccessTokenUsingRefreshToken(): Promise<any> {
|
||||||
|
|
||||||
export async function getNewAccessTokenUsingRefreshTokenServer(refresh_token_cookie: any): Promise<any> {
|
export async function getNewAccessTokenUsingRefreshTokenServer(refresh_token_cookie: any): Promise<any> {
|
||||||
const requestOptions: any = {
|
const requestOptions: any = {
|
||||||
method: "POST",
|
method: "GET",
|
||||||
redirect: "follow",
|
redirect: "follow",
|
||||||
headers: {
|
headers: {
|
||||||
Cookie: `refresh_token_cookie=${refresh_token_cookie}`,
|
Cookie: `refresh_token_cookie=${refresh_token_cookie}`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue