-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(mellow-vue): remove .vue in import * feat(mellow-svelte): update dependencies * feat(mellow-svelte): add routes * feat(mellow-svelte): add actions * feat(mellow-svelte): add custom config * feat(mellow-svelte): add policies * feat(mellow-svelte): setup mail * fix(mellow-vue): resolve double wrapping of Link * fix(mellow-vue): remove wrapping with ref * feat(mellow-svelte): add layout page * feat(mellow-svelte): add logic for url 'back' * fix(mellow-react): add Tailwind content config to match project * fix(mellow-vue): add Tailwind content config to match project * fix(mellow-svelte): add Tailwind content config to match project * feat(mellow-svelte): add policies * feat(mellow-react): setup wish * feat(mellow-svelte): setup wish * feat(mellow-svelte): add prettier plugin for svelte * feat(mellow-svelte): remove unneeded pages * feat(mellow-svelte): added homepage * feat(mellow-vue): remove unused Link * feat(mellow-react): remove unused Link * feat(mellow-react): remove duplicate * chore(mellow-react): format * feat(mellow-svelte): add email templates * chore(mellow-svelte): remove deprecated back * feat: update jsconfig * chore(mellow-svelte): remove types * feat(mellow-svelte): add GoogleButton component * feat(mellow-svelte): add button * feat(mellow-svelte): add InputBase * feat(mellow-svelte): add InputText * chore(mellow-vue): add extension in import * chore(mellow-react): add extension in imports * chore(mellow-vue): add missing extension * feat(mellow-svelte): add InputEmail * feat(mellow-svelte): add InputPassword * feat(mellow-svelte): add user model * feat(mellow-svelte): fix form inputs * fix(mellow-svelte): forward props * feat(mellow-vue): remove optional access * feat(mellow-svelte): add login page * feat(mellow-vue): add Vue as dependency * feat(mellow-svelte): add Svelte as dependency * feat(mellow-svelte): setup test * feat(mellow-vue): use testing environment * feat(mellow-svelte): add testing environment * feat: add columnName to global attributes * feat(mellow-svelte): use good ol function declaration * feat(mellow-svelte): add signup page * feat(mellow-svelte): add helpers * chore(mellow-svelte): install sails-hook-organics * feat(mellow-svelte): add custom hook * fix(mellow-svelte): fix wrong identifier * feat(mellow-svelte): add check-email page * feat(mellow-svelte): add success page * feat(mellow-svelte): add link-expired page * feat(mellow-svelte): fix typo * feat: change message on success * feat(mellow-svelte): add forgot-password page * feat(mellow-vue): fix grammar * feat(mellow-vue): remove unused code * feat(mellow-svelte): add reset-password page * feat(mellow-svelte): add dashboard page * feat(mellow-svelte): modify InputButton to have class merge * chore(mellow-svelte): remove ts comments * feat(mellow-svelte): modify component to forward on click event to parent * feat(mellow-svelte): add profile page
- Loading branch information
1 parent
d0fa003
commit ba9ff0f
Showing
101 changed files
with
5,532 additions
and
1,537 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
5 changes: 3 additions & 2 deletions
5
templates/mellow-react/assets/js/pages/auth/forgot-password.jsx
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { Link, Head } from '@inertiajs/react' | ||
|
||
export default function LinkExpired() { | ||
return ( | ||
<> | ||
|
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
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
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
10 changes: 5 additions & 5 deletions
10
templates/mellow-react/assets/js/pages/dashboard/profile.jsx
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
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
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
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,91 @@ | ||
module.exports = { | ||
friendlyName: 'Callback', | ||
|
||
description: 'Callback auth.', | ||
|
||
inputs: { | ||
provider: { | ||
isIn: ['google'], | ||
required: true | ||
}, | ||
code: { | ||
type: 'string', | ||
required: true | ||
} | ||
}, | ||
|
||
exits: { | ||
success: { | ||
responseType: 'redirect' | ||
} | ||
}, | ||
fn: async function ({ code, provider }, exits) { | ||
const req = this.req | ||
const googleUser = await sails.wish.provider(provider).user(code) | ||
|
||
User.findOrCreate( | ||
{ or: [{ googleId: googleUser.id }, { email: googleUser.email }] }, | ||
{ | ||
googleId: googleUser.id, | ||
email: googleUser.email, | ||
fullName: googleUser.name, | ||
googleAvatarUrl: googleUser.picture, | ||
googleAccessToken: googleUser.accessToken, | ||
googleIdToken: googleUser.idToken, | ||
emailStatus: googleUser.verified_email ? 'verified' : 'unverified' | ||
} | ||
).exec(async (error, user, wasCreated) => { | ||
if (error) throw error | ||
|
||
if (!wasCreated && googleUser.verified_email) { | ||
await User.updateOne({ id: user.id }).set({ | ||
emailStatus: 'verified' | ||
}) | ||
} | ||
if (!wasCreated && user.googleId !== googleUser.id) { | ||
// Checks if the user email has changed since last log in | ||
// And then update the email change candidate which will be used be used to prompt the user to update their email | ||
await User.updateOne({ id: user.id }).set({ | ||
emailChangeCandidate: googleUser.email | ||
}) | ||
} | ||
if (!wasCreated && user.email !== googleUser.email) { | ||
// Checks if the user email has changed since last log in | ||
// And then update the email change candidate which will be used be used to prompt the user to update their email | ||
await User.updateOne({ id: user.id }).set({ | ||
emailChangeCandidate: googleUser.email | ||
}) | ||
} | ||
|
||
// Checks if the user name has changed since last log in | ||
// And then update the name if changed | ||
if (!wasCreated && user.fullName !== googleUser.name) { | ||
await User.updateOne({ id: user.id }).set({ | ||
fullName: googleUser.name | ||
}) | ||
} | ||
|
||
if (!wasCreated && user.googleAvatarUrl !== googleUser.picture) { | ||
await User.updateOne({ id: user.id }).set({ | ||
googleAvatarUrl: googleUser.picture | ||
}) | ||
} | ||
|
||
if (!wasCreated && user.googleAccessToken !== googleUser.accessToken) { | ||
await User.updateOne({ id: user.id }).set({ | ||
googleAccessToken: googleUser.accessToken | ||
}) | ||
} | ||
|
||
if (!wasCreated && user.googleIdToken !== googleUser.idToken) { | ||
await User.updateOne({ id: user.id }).set({ | ||
googleIdToken: googleUser.idToken | ||
}) | ||
} | ||
|
||
req.session.userId = user.id | ||
const urlToRedirectTo = '/dashboard' | ||
return exits.success(urlToRedirectTo) | ||
}) | ||
} | ||
} |
Oops, something went wrong.