Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/backend/src/routes/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function connectRoutes(app: FastifyInstance) {

try {
// Decode state to find which user requested the connect
const decodedState = parseGoogleState(state);
const decodedState = parseOAuthState(state);

if (!decodedState) {
return reply.redirect(`${process.env.PUBLIC_APP_URL}/settings?error=connect_failed`);
Expand Down Expand Up @@ -158,7 +158,7 @@ export async function connectRoutes(app: FastifyInstance) {
});
}

function parseGoogleState(state: string): ParsedOAuthState | null {
function parseOAuthState(state: string): ParsedOAuthState | null {
try {
const decoded = JSON.parse(Buffer.from(state, 'base64').toString('utf-8'));

Expand Down