-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new configuration options (#19)
- Loading branch information
1 parent
39d6fe7
commit 3e07d84
Showing
43 changed files
with
497 additions
and
888 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": false, | ||
"printWidth": 120 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
|
||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [ | ||
|
||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
} | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"prettier.singleQuote": false | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,19 +19,9 @@ | |
</head> | ||
<body id="app"> | ||
<!-- Alert --> | ||
<div | ||
v-cloak | ||
v-if="showError" | ||
role="alert" | ||
class="p-4 border-red-500 rounded border-s-4 bg-red-50" | ||
> | ||
<div v-cloak v-if="showError" role="alert" class="p-4 border-red-500 rounded border-s-4 bg-red-50"> | ||
<div class="flex items-center gap-2 text-red-800"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 24 24" | ||
fill="currentColor" | ||
class="w-5 h-5" | ||
> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-5 h-5"> | ||
<path | ||
fill-rule="evenodd" | ||
d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" | ||
|
@@ -47,11 +37,7 @@ | |
<!-- Form --> | ||
<div class="max-w-screen-xl px-4 py-16 mx-auto sm:px-6 lg:px-8"> | ||
<div class="max-w-lg mx-auto"> | ||
<form | ||
@submit.prevent | ||
action="" | ||
class="p-4 mt-6 mb-0 rounded-lg shadow-lg sm:p-6 lg:p-8" | ||
> | ||
<form @submit.prevent action="" class="p-4 mt-6 mb-0 rounded-lg shadow-lg sm:p-6 lg:p-8"> | ||
<div class="flex flex-row text-xl font-semibold"> | ||
<span class="mr-1 -rotate-90"> | ||
<svg | ||
|
@@ -72,9 +58,7 @@ | |
Admin Dashboard Login | ||
</div> | ||
|
||
<p class="my-4 text-lg mx-4text-left"> | ||
Welcome, sign in with your admin credentials. | ||
</p> | ||
<p class="my-4 text-lg mx-4text-left">Welcome, sign in with your admin credentials.</p> | ||
|
||
<div class="my-4"> | ||
<label for="email" class="sr-only">Email</label> | ||
|
@@ -88,9 +72,7 @@ | |
placeholder="Enter email" | ||
/> | ||
|
||
<span | ||
class="absolute inset-y-0 grid px-4 end-0 place-content-center" | ||
> | ||
<span class="absolute inset-y-0 grid px-4 end-0 place-content-center"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
class="w-4 h-4 text-gray-400" | ||
|
@@ -120,9 +102,7 @@ | |
placeholder="Enter password" | ||
/> | ||
|
||
<span | ||
class="absolute inset-y-0 grid px-4 end-0 place-content-center" | ||
> | ||
<span class="absolute inset-y-0 grid px-4 end-0 place-content-center"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
class="w-4 h-4 text-gray-400" | ||
|
@@ -184,19 +164,13 @@ | |
<div class="m-4 text-xs text-gray-400"> | ||
Powered by | ||
<span class="underline"> | ||
<a href="https://github.com/authcompanion/authcompanion2" | ||
>AuthCompanion</a | ||
> | ||
<a href="https://github.com/authcompanion/authcompanion2">AuthCompanion</a> | ||
</span> | ||
</div> | ||
</div> | ||
<!-- scripts --> | ||
<script type="module"> | ||
import { | ||
createApp, | ||
ref, | ||
computed, | ||
} from "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.esm-browser.prod.js"; | ||
import { createApp, ref, computed } from "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.esm-browser.prod.js"; | ||
|
||
createApp({ | ||
setup() { | ||
|
@@ -225,15 +199,11 @@ | |
"content-type": "application/json", | ||
}, | ||
}); | ||
const appOrigin = | ||
await response.headers.get("x-authc-app-origin"); | ||
const appOrigin = await response.headers.get("x-authc-app-origin"); | ||
const resbody = await response.json(); | ||
|
||
if (response.ok) { | ||
window.localStorage.setItem( | ||
"ACCESS_TOKEN", | ||
resbody.data.attributes.access_token, | ||
); | ||
window.localStorage.setItem("ACCESS_TOKEN", resbody.data.attributes.access_token); | ||
|
||
window.location.href = appOrigin; | ||
} else { | ||
|
@@ -247,8 +217,7 @@ | |
showError.value = true; | ||
|
||
errorTitle.value = "Error"; | ||
errorDetail.value = | ||
"There was an issue logging in, please try again"; | ||
errorDetail.value = "There was an issue logging in, please try again"; | ||
} | ||
}; | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,40 +20,26 @@ | |
<!-- Form --> | ||
<div class="max-w-screen-xl px-4 py-16 mx-auto sm:px-6 lg:px-8"> | ||
<div class="max-w-lg mx-auto"> | ||
<form | ||
@submit.prevent | ||
action="" | ||
class="p-4 mt-6 mb-0 rounded-lg shadow-lg sm:p-6 lg:p-8" | ||
> | ||
<form @submit.prevent action="" class="p-4 mt-6 mb-0 rounded-lg shadow-lg sm:p-6 lg:p-8"> | ||
<p class="text-2xl text-green-500">Success 🎉 !</p> | ||
<p class="py-3 text-black"> | ||
Nice job getting started with AuthCompanion. | ||
</p> | ||
<p class="py-3 text-black">Nice job getting started with AuthCompanion.</p> | ||
|
||
<p class="pt-8 text-black"> | ||
When you're ready, tell AuthC to redirect users after successful | ||
login to your application's home page (instead of this temporary | ||
one). | ||
When you're ready, tell AuthC to redirect users after successful login to your application's home page | ||
(instead of this temporary one). | ||
</p> | ||
|
||
<p class="py-3 text-black"> | ||
For a full guide on how to integrate and launch AuthCompanion, check | ||
those sections in the docs: | ||
<a | ||
class="text-blue-600 underline hover:text-blue-800" | ||
href="https://docs.authcompanion.com/" | ||
For a full guide on how to integrate and launch AuthCompanion, check those sections in the docs: | ||
<a class="text-blue-600 underline hover:text-blue-800" href="https://docs.authcompanion.com/" | ||
>https://docs.authcompanion.com/</a | ||
> | ||
</p> | ||
|
||
<p class="text-black"> | ||
After a successful login or account registration, AuthC provides | ||
developers a user's access token which is used for managing your | ||
user's session. The access token contains helpful information about | ||
the user. | ||
<a | ||
class="text-blue-600 underline hover:text-blue-800" | ||
:href="jwtDebugUrl" | ||
After a successful login or account registration, AuthC provides developers a user's access token which is | ||
used for managing your user's session. The access token contains helpful information about the user. | ||
<a class="text-blue-600 underline hover:text-blue-800" :href="jwtDebugUrl" | ||
>Decode the token's payload here to find out.</a | ||
> | ||
</p> | ||
|
@@ -65,19 +51,13 @@ | |
<div class="m-4 text-xs text-gray-400"> | ||
Powered by | ||
<span class="underline"> | ||
<a href="https://github.com/authcompanion/authcompanion2" | ||
>AuthCompanion</a | ||
> | ||
<a href="https://github.com/authcompanion/authcompanion2">AuthCompanion</a> | ||
</span> | ||
</div> | ||
</div> | ||
<!-- Scripts --> | ||
<script type="module"> | ||
import { | ||
createApp, | ||
ref, | ||
computed, | ||
} from "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.esm-browser.prod.js"; | ||
import { createApp, ref, computed } from "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.esm-browser.prod.js"; | ||
|
||
createApp({ | ||
setup() { | ||
|
Oops, something went wrong.