* Chore disable git submodule for web-client and app-backend * Chore add newest source code of app-backend and web-client --------- Co-authored-by: Hien To <tominhhien97@gmail.com>
20 lines
376 B
TypeScript
20 lines
376 B
TypeScript
import { getSession } from "next-auth/react";
|
|
|
|
export async function getAccessToken() {
|
|
const session = await getSession();
|
|
if (session) {
|
|
// @ts-ignore
|
|
return session.access_token;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
export async function getIdToken() {
|
|
const session = await getSession();
|
|
if (session) {
|
|
// @ts-ignore
|
|
return session.id_token;
|
|
}
|
|
return null;
|
|
}
|