You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(chalk.green("✅ Added 'auth' path alias to tsconfig.json"));
235
222
}else{
236
-
console.log(chalk.yellow("ℹ️ 'auth' path alias already exists, skipping."));
223
+
console.log(chalk.yellow("'auth' path alias already exists, skipping."));
237
224
}
238
225
}
239
226
}
240
227
241
228
}else{
242
-
console.log(chalk.yellow('⚠️ src folder not found, skipping app/api creation.'));
229
+
console.log(chalk.yellow('src folder not found, skipping app/api creation.'));
243
230
}
244
231
245
232
}catch(error){
246
233
console.error(chalk.red("Error setting up Authjs for authentication"),error.message);
247
234
console.log(chalk.yellow("You may need to finish authjs setup manually."));
235
+
}finally{
236
+
console.log(chalk.blue("For localhost testing, you may need an HTTPS proxy."));
237
+
console.log(chalk.blue("Run the following command for temporary public URL:"));
238
+
console.log(chalk.cyan("hp expose"));
248
239
}
249
240
}else{
250
-
console.log(chalk.yellow(`⚠️ Auth.js setup for framework '${framework}' is not yet automated. Please refer to https://authjs.dev/ for manual setup instructions.`));
241
+
console.log(chalk.yellow(`Auth.js setup for framework '${framework}' is not yet automated. Please refer to https://authjs.dev/ for manual setup instructions.`));
console.log(chalk.yellow(`clerk setup for framework '${framework}' is not yet automated. Please refer to https://clerk.com/docs for manual setup instructions.`));
270
+
console.log(chalk.yellow(`Clerk setup for framework '${framework}' is not yet automated. Please refer to https://clerk.com/docs for manual setup instructions.`));
271
+
}
272
+
try{
273
+
constmdPath=path.join('CLERKSETUP.md');
274
+
letmd=`# Clerk Setup\n\nFirst-time setup:\n1. Sign in to your Clerk dashboard and create a new application.\n2. Copy your 'CLERK_PUBLISHABLE_KEY' and 'CLERK_SECRET_KEY' into your .env | .env.local file.\n3. `;
275
+
if(database==='mongodb'){
276
+
md+=`\n4. Set up Clerk webhooks for DBsync:\n - In the Clerk dashboard, go to Webhooks and create a new webhook with the URL: <HTTPS_URL>/api/webhooks or <HTTPS_URL>/api/webhooks/clerk\n - Subscribe to events: user.created, user.updated, user.deleted\n - Also add CLERK_WEBHOOK_SIGNING_SECRET to your environment variables.`;
277
+
}
278
+
md+=`\n\nFor localhost testing, you may need an HTTPS proxy.\nRun the following command for temporary public URL:\n\n hp expose\n`;
279
+
280
+
fs.writeFileSync(mdPath,md,'utf8');
281
+
}catch(err){
282
+
console.log(chalk.yellow('Could not write CLERKSETUP.md:'),err&&err.message ? err.message : err);
289
283
}
290
284
291
285
}
@@ -297,12 +291,15 @@ export async function setupAuth0(state) {
297
291
298
292
// Validate framework support
299
293
if(!isFrameworkSupported(framework)){
300
-
console.log(chalk.red(`Framework '${framework}' is not supported for Auth.js setup.`));
console.log(chalk.blue("For localhost testing, you may need an HTTPS proxy."));
301
+
console.log(chalk.blue("Run the following command for temporary public URL:"));
302
+
console.log(chalk.cyan("hp expose"));
306
303
return;
307
304
}else{
308
305
console.log(chalk.yellow(`Auth0 setup for framework '${framework}' is not yet automated. Please refer to https://auth0.com/docs/quickstart/spa/angular for manual setup instructions.`));
0 commit comments