π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: login with github
Nevo Davidbe868c1ca5f7
diff --git a/apps/frontend/src/middleware.ts b/apps/frontend/src/middleware.tsindex 5ccc6bb80..9a3a3cee6 100644--- a/apps/frontend/src/middleware.ts+++ b/apps/frontend/src/middleware.ts@@ -30,9 +30,9 @@ export async function middleware(request: NextRequest) {const url = new URL(nextUrl).search;if (nextUrl.href.indexOf('/auth') === -1 && !authCookie) {- const providers = ['google', 'github'];+ const providers = ['google', 'settings'];const findIndex = providers.find(p => nextUrl.href.indexOf(p) > -1);- const additional = !findIndex ? '' : (url.indexOf('?') > -1 ? '&' : '?') + `provider=${findIndex.toUpperCase()}`;+ const additional = !findIndex ? '' : (url.indexOf('?') > -1 ? '&' : '?') + `provider=${(findIndex === 'settings' ? 'github' : findIndex).toUpperCase()}`;return NextResponse.redirect(new URL(`/auth${url}${additional}`, nextUrl.href));}