mirror of
https://github.com/biersoeckli/QuickStack.git
synced 2026-05-14 14:03:42 -05:00
removed nextauth url
This commit is contained in:
@@ -24,7 +24,7 @@ export const registerUser = async (prevState: any, inputData: RegisterFormInputS
|
||||
value: url.hostname
|
||||
});
|
||||
await quickStackService.createOrUpdateIngress(url.hostname);
|
||||
return new SuccessActionResult(undefined, 'QuickStack is now available at: ' + url.href);
|
||||
return new SuccessActionResult(undefined, 'In a couple seconds QuickStack is available at: ' + url.href);
|
||||
}
|
||||
return new SuccessActionResult(undefined, 'Successfully registered user');
|
||||
});
|
||||
|
||||
@@ -34,14 +34,7 @@ export default function UserRegistrationForm() {
|
||||
useEffect(() => {
|
||||
if (state.status === 'success') {
|
||||
toast.success(state.message ?? 'Registration successful. You can now login.');
|
||||
const formValues = form.getValues();
|
||||
signIn("credentials", {
|
||||
username: formValues.email,
|
||||
password: formValues.password,
|
||||
redirect: false,
|
||||
}).then(() => {
|
||||
redirect('/');
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
}, [state]);
|
||||
|
||||
|
||||
+4
-2
@@ -43,8 +43,10 @@ export function NavBar() {
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem className="text-red-500"
|
||||
onClick={() => signOut({
|
||||
callbackUrl: "/auth",
|
||||
redirect: true
|
||||
callbackUrl: undefined,
|
||||
redirect: false
|
||||
}).then(() => {
|
||||
window.open("/auth", "_self");
|
||||
})}>
|
||||
Logout
|
||||
</DropdownMenuItem>
|
||||
|
||||
@@ -25,8 +25,6 @@ export const updateIngressSettings = async (prevState: any, inputData: QsIngress
|
||||
|
||||
await quickStackService.createOrUpdateService(!validatedData.disableNodePortAccess);
|
||||
await quickStackService.createOrUpdateIngress(validatedData.serverUrl);
|
||||
await quickStackService.createOrUpdateDeployment(url.hostname);
|
||||
|
||||
});
|
||||
|
||||
export const updateLetsEncryptSettings = async (prevState: any, inputData: QsLetsEncryptSettingsModel) =>
|
||||
|
||||
@@ -16,14 +16,14 @@ class QuickStackService {
|
||||
|
||||
async updateQuickStack() {
|
||||
const existingDeployment = await this.getExistingDeployment();
|
||||
await this.createOrUpdateDeployment(existingDeployment.nextAuthHostname, existingDeployment.nextAuthSecret);
|
||||
await this.createOrUpdateDeployment(existingDeployment.nextAuthSecret);
|
||||
}
|
||||
|
||||
async initializeQuickStack() {
|
||||
await namespaceService.createNamespaceIfNotExists(this.QUICKSTACK_NAMESPACE)
|
||||
const nextAuthSecret = await this.deleteExistingDeployment();
|
||||
await this.createOrUpdatePvc();
|
||||
await this.createOrUpdateDeployment(undefined, nextAuthSecret);
|
||||
await this.createOrUpdateDeployment(nextAuthSecret);
|
||||
await this.createOrUpdateService(true);
|
||||
await this.waitUntilQuickstackIsRunning();
|
||||
console.log('QuickStack successfully initialized');
|
||||
@@ -261,7 +261,7 @@ class QuickStackService {
|
||||
}
|
||||
}
|
||||
|
||||
async createOrUpdateDeployment(nextAuthHostname?: string, inputNextAuthSecret?: string, imageTag = 'latest') {
|
||||
async createOrUpdateDeployment(inputNextAuthSecret?: string, imageTag = 'latest') {
|
||||
const generatedNextAuthSecret = crypto.randomBytes(32).toString('base64');
|
||||
const existingDeployment = await this.getExistingDeployment();
|
||||
const body: V1Deployment = {
|
||||
@@ -304,10 +304,6 @@ class QuickStackService {
|
||||
name: 'NEXTAUTH_SECRET',
|
||||
value: inputNextAuthSecret || existingDeployment.nextAuthSecret || generatedNextAuthSecret
|
||||
},
|
||||
...nextAuthHostname ? [{
|
||||
name: 'NEXTAUTH_URL',
|
||||
value: `https://${nextAuthHostname}`
|
||||
}] : [],
|
||||
...process.env.K3S_JOIN_TOKEN ? [{
|
||||
name: 'K3S_JOIN_TOKEN',
|
||||
value: process.env.K3S_JOIN_TOKEN
|
||||
|
||||
Reference in New Issue
Block a user