Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add qwik framework #21

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions lib/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export async function detectFramework(path = "") {
if (packageJson?.devDependencies?.["@sveltejs/kit"])
foundFrameworks.push("sveltekit")

if (
packageJson?.devDependencies?.["@qwik.dev/router"] ||
packageJson?.devDependencies?.["@builder.io/qwik-city"]
) {
foundFrameworks.push("qwik")
}

if (foundFrameworks.length === 1) return foundFrameworks[0]

if (foundFrameworks.length > 1) {
Expand Down
14 changes: 11 additions & 3 deletions lib/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// TODO: Get these programmatically

/**
* @typedef {"next" | "express" | "sveltekit"} SupportedFramework
* @typedef {"next" | "express" | "sveltekit" | "qwik" } SupportedFramework
*/

export const frameworks = {
Expand Down Expand Up @@ -31,6 +31,14 @@ export const frameworks = {
port: 3000,
envFile: ".env",
},
qwik: {
name: "Qwik",
src: "https://github.com/QwikDev/qwik",
demo: "https://qwik-auth-example.vercel.app/",
path: "/auth/",
port: 5173,
envFile: ".env.local",
},
}

export const providers = {
Expand Down Expand Up @@ -170,8 +178,8 @@ export const providers = {
6. Set the app name
7. Click on *App Settings*
8. Click *Set up* under *User authentication settings*
9. Select *Web App, Automated App or Bot* at "Type of app"
10. Add the callback URI (on your clipboard) to *Callback URLs*
9. Select *Web App, Automated App or Bot* at "Type of app"
10. Add the callback URI (on your clipboard) to *Callback URLs*
11. Fill out the other required fields (your website)
12. Copy and paste the *Client ID*
13. Copy and paste the *Client Secret*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth",
"version": "1.2.3",
"version": "1.2.4",
"homepage": "https://cli.authjs.dev",
"repository": {
"type": "git",
Expand Down