mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Merge branch 'main' of github.com:stackframe-projects/stack
This commit is contained in:
commit
a66e32fef7
@ -153,7 +153,7 @@ export async function createProject(
|
||||
config: {
|
||||
create: {
|
||||
allowLocalhost: projectOptions.allowLocalhost,
|
||||
credentialEnabled: projectOptions.credentialEnabled,
|
||||
enableCredential: projectOptions.credentialEnabled,
|
||||
oauthProviderConfigs: {
|
||||
create: (['github', 'facebook', 'google', 'microsoft'] as const).map((id) => ({
|
||||
id,
|
||||
@ -299,7 +299,7 @@ export async function updateProject(
|
||||
// Update credentialEnabled
|
||||
transaction.push(prismaClient.projectConfig.update({
|
||||
where: { id: project.config.id },
|
||||
data: { credentialEnabled: options.config.credentialEnabled },
|
||||
data: { enableCredential: options.config.credentialEnabled },
|
||||
}));
|
||||
}
|
||||
|
||||
@ -358,7 +358,7 @@ function projectJsonFromDbType(project: ProjectDB): ProjectJson {
|
||||
evaluatedConfig: {
|
||||
id: project.config.id,
|
||||
allowLocalhost: project.config.allowLocalhost,
|
||||
credentialEnabled: project.config.credentialEnabled,
|
||||
credentialEnabled: project.config.enableCredential,
|
||||
domains: project.config.domains.map((domain) => ({
|
||||
domain: domain.domain,
|
||||
handlerPath: domain.handlerPath,
|
||||
|
||||
@ -274,7 +274,8 @@ export class StackClientInterface {
|
||||
// TODO this is a hack. Occurs when the admin access token is invalid, or expired. Has plenty of weird side effects so we should replace this
|
||||
if ("internalAdminAccessToken" in this.options && error?.message?.includes?.("Invalid API key") && typeof window !== "undefined") {
|
||||
alert("Your session has expired. The page will now reload." + (process.env.NODE_ENV == "development" ? "\n\nThis is a hack and we should probably fix this at some point." : ""));
|
||||
window.location.reload();
|
||||
window.location.href = "/";
|
||||
document.body.innerHTML = "Reloading...";
|
||||
await neverResolve();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user