Closed djudjuu closed 3 years ago
also I recommedn keeping the those changes to the nextauth.ts file staged, so that you can skip the login-via email address step:
const options = {
// Configure one or more authentication providers
providers: [
Providers.Credentials({
// The name to display on the sign in form (e.g. 'Sign in with...')
name: "Arboreum",
credentials: {
username: { label: "Email", type: "text", placeholder: "" },
// password: { label: "Password", type: "password" }
},
authorize: async (credentials) => {
const user = {
id: 1,
name: "",
email: credentials.username,
}
if (user) {
// Any user object returned here will be saved in the JSON Web Token
return Promise.resolve(user)
} else {
return Promise.resolve(null)
}
},
}),
],
callbacks: ...
also I recommedn keeping the those changes to the nextauth.ts file staged, so that you can skip the login-via email address step:
const options = { // Configure one or more authentication providers providers: [ Providers.Credentials({ // The name to display on the sign in form (e.g. 'Sign in with...') name: "Arboreum", credentials: { username: { label: "Email", type: "text", placeholder: "" }, // password: { label: "Password", type: "password" } }, authorize: async (credentials) => { const user = { id: 1, name: "", email: credentials.username, } if (user) { // Any user object returned here will be saved in the JSON Web Token return Promise.resolve(user) } else { return Promise.resolve(null) } }, }), ], callbacks: ...
This should probably be conditional on a configuration flag, maybe we can have passwords with accounts - that way it would not matter if this hits production
is included in #219 as well, so we could close that once that is merged
fixes make reset-db
make seeds
now resets the db and creates users in state:non kyced & non onboarded kyced & non onboarded kyced & onboarded