Packages
Potionx project generator. Provides a `mix potionx.new` task to bootstrap a new Elixir application with Phoenix, Absinthe, Pow and Vue dependencies.
Current section
Files
Jump to
Current section
Files
templates/potionx/frontend/shared/src/signIn.ts
export type SignInArgs = {
provider: string
}
export default async (args: SignInArgs) => {
const {
data: {
url
}
} = await fetch(
`/api/v1/auth/${args.provider}/new`
)
.then(res => res.json())
window.location = url;
}