-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SolidJS-Tailwind] Implement authentication (#734)
* chore(solidjs): remove example components * feat(solidjs): add signin page * refactor(solidjs): improve auth setup * feat(solidjs): pencil in auth flow * feat(solidjs): add example github communication * [Angular - NgRx - SCSS] 440: state & service refactor (#527) * setup: get branch caught up and ready for work * feat: refactored repository service and test * feat: refactor of user service and test * feat: updated user service spec * feat: created dashboard store files; updated global state files; renamed RepoState and updated all calls * attempt to fix issues with service updates; some refactoring and adjusting so app compiles * feat: added auth user data to auth state; updated nav component to use auth state * feat: adjusted auth call; fixed user call so home page loads * moved some user logic; still having reload issues and repo view issues * feat: got app working again! cleaned out console logs * rebased and fixed most files * fix broken tests * removed unused code * fix: fix pr comments and most tests * fix: fixed final broken unit test * fix: updated test; removed unused code in user effect; new user mapping file * add todo for refactor improvements; update authUser effect to use different rxjs operation Co-authored-by: LindaT <[email protected]> * feat(solidjs) - Create navigation header (#840) * fix(angular-apollo-tailwind): append protocol if missing from user url (#637) * fix(angular-apollo-tailwind): append protocol if missing from user url Refs: #591 * test(angular-apollo-tailwind): update with testcases Closes: #591 * chore: repo card with story and test (#737) * chore: repo card with story and test * fix comments * fix coment Co-authored-by: Victor Chukwuebuka Umeh <[email protected]> * chore: gist panel UI (#741) * chore: gist panel UI * fix coment * fix coment Co-authored-by: Victor Chukwuebuka Umeh <[email protected]> * chore(solidjs): remove example components * fixed comments, clean ups Co-authored-by: Linda Thompson <[email protected]> Co-authored-by: LindaT <[email protected]> Co-authored-by: Daian Scuarissi <[email protected]> Co-authored-by: Oluwakorede Cole <[email protected]> Co-authored-by: Jerry Hogan <[email protected]> Co-authored-by: Victor Chukwuebuka Umeh <[email protected]>
- Loading branch information
1 parent
a9d93e6
commit 6f21c5c
Showing
31 changed files
with
349 additions
and
253 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,3 @@ | ||
VITE_API_URL=https://api.starter.dev/api | ||
VITE_GITHUB_URL=https://api.github.com | ||
VITE_BASE_URL=http://localhost:3000 |
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,5 +1,10 @@ | ||
node_modules | ||
dist | ||
|
||
# env file | ||
.env.development | ||
.env.production | ||
.env.local | ||
|
||
# .vscode | ||
.vscode/* |
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,16 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" /> | ||
<title>solidjs-tailwindcss starter kit</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<meta name="theme-color" content="#000000"/> | ||
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico"/> | ||
<title>solidjs-tailwindcss starter kit</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
|
||
<script src="/src/index.jsx" type="module"></script> | ||
</body> | ||
<script src="/src/index.jsx" type="module"></script> | ||
</body> | ||
</html> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,11 @@ | ||
import { createStore } from 'solid-js/store'; | ||
|
||
const createAuthStore = () => | ||
createStore({ | ||
token: null, | ||
get isAuthenticated() { | ||
return !!this.token; | ||
}, | ||
}); | ||
|
||
export default createAuthStore; |
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,11 @@ | ||
import createAuthStore from './AuthStore'; | ||
import ROUTES from '../routes'; | ||
import createPreventUnauthorised from './preventUnauthorised'; | ||
|
||
const [authStore, setAuth] = createAuthStore(); | ||
const preventUnauthorised = createPreventUnauthorised(authStore, ROUTES.SIGNIN); | ||
export const useAuth = () => ({ | ||
authStore, | ||
preventUnauthorised, | ||
setAuth, | ||
}); |
Oops, something went wrong.