This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AUTH_REDIRECT_COOKIE, COLLECTION_SLUG } from '@/constants' | |
import { lucia } from '@/lib/lucia' | |
import { authProviders } from '@/lib/lucia/providers' | |
import { getPayloadHMR } from '@payloadcms/next/utilities' | |
import config from '@/payload.config' | |
import { OAuth2RequestError } from 'arctic' | |
import { cookies } from 'next/headers' | |
import type { NextRequest } from 'next/server' | |
export async function GET( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'server-only' | |
import { fetchJson } from '@/lib/utils/fetchJson' | |
import { Google, Yandex, generateState, generateCodeVerifier } from 'arctic' | |
import { cookies } from 'next/headers' | |
import type { Customer } from '@/payload-types' | |
import type { NextRequest } from 'next/server' | |
type ExchangeCodeResponse = { | |
data: Pick<Customer, 'provider' | 'providerAccountId' | 'metadata'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |