-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
4,997 additions
and
0 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,2 @@ | ||
node_modules | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "sjwt", | ||
"version": "1.0.0", | ||
"description": "Use Simple JWT the even easier way", | ||
"files": ["dist"], | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"type": "module", | ||
"scripts": { | ||
"build": "unbuild", | ||
"test": "test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Simple-JWT/sjwt.git" | ||
}, | ||
"keywords": [ | ||
"sjwt", | ||
"simple", | ||
"jwt", | ||
"jwt", | ||
"authentication", | ||
"users" | ||
], | ||
"author": "Jonathan Walters", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Simple-JWT/sjwt/issues" | ||
}, | ||
"homepage": "https://simplejwt.com", | ||
"devDependencies": { | ||
"unbuild": "^2.0.0" | ||
} | ||
} |
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 @@ | ||
import register from './register.js'; | ||
import login from './login.js'; | ||
|
||
export { | ||
register, | ||
login, | ||
}; |
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 @@ | ||
const store = ({ | ||
user, | ||
}) => { | ||
console.log('stored: ', user); | ||
}; | ||
|
||
export default store; |
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,12 @@ | ||
import defaultStore from './lib/store.js'; | ||
|
||
const login = ({ | ||
email, | ||
password, | ||
projectId, | ||
store = defaultStore, | ||
}) => { | ||
console.log('login', {email, password, projectId, store}); | ||
}; | ||
|
||
export default login; |
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,14 @@ | ||
import defaultStore from './lib/store.js'; | ||
|
||
const register = ({ | ||
email, | ||
password, | ||
projectId, | ||
store = defaultStore, | ||
}) => { | ||
console.log('register', {email, password, projectId, store}); | ||
const user = {email, password}; | ||
store({user}); | ||
}; | ||
|
||
export default register; |