mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
Merge branch 'truman/shared-ui-auth-di' into truman/new-server-card-states
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { Labrinth } from '@modrinth/api-client/src/modules/labrinth/types'
|
||||
|
||||
import { createContext } from './create-context'
|
||||
|
||||
export interface AuthProvider {
|
||||
session_token: string | null
|
||||
user: Labrinth.Users.v2.User | null
|
||||
requestSignIn: (redirectPath: string) => void | Promise<void>
|
||||
}
|
||||
|
||||
export const [injectAuth, provideAuth] = createContext<AuthProvider>('root', 'auth')
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './api-client'
|
||||
export * from './auth'
|
||||
export * from './app-backup'
|
||||
export * from './content-manager'
|
||||
export { createContext } from './create-context'
|
||||
|
||||
Reference in New Issue
Block a user