feat: design applications and first api calls
Co-authored-by: Walid <87608619+WalidKorchi@users.noreply.github.com>
This commit is contained in:
24
utils/authentication/index.ts
Normal file
24
utils/authentication/index.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { UserCurrent } from 'models/User'
|
||||
|
||||
export interface RefreshTokenResponse {
|
||||
accessToken: string
|
||||
|
||||
/** how long, in milliseconds, until the accessToken expires */
|
||||
expiresIn: number
|
||||
type: 'Bearer'
|
||||
}
|
||||
|
||||
export interface Tokens extends RefreshTokenResponse {
|
||||
refreshToken: string
|
||||
}
|
||||
|
||||
export interface PagePropsWithAuthentication {
|
||||
authentication: {
|
||||
tokens: Tokens
|
||||
user: UserCurrent
|
||||
}
|
||||
}
|
||||
|
||||
export * from './Authentication'
|
||||
export * from './authenticationFromServerSide'
|
||||
export * from './AuthenticationContext'
|
Reference in New Issue
Block a user