Closed BracketJohn closed 1 year ago
Hi @BracketJohn
Would it be possible to add Directus CMS documentation as well? I am having troubles with refresh tokens. I've made a gist on my current setup.
https://gist.github.com/madsh93/eb2e36d19af3e73bfec8251f51448bc5
I'll happily provide access to a Directus CMS to test. I'm on Sidebase Discord server if you'd like to discuss it "Mads#6530".
Hey @madsh93!
Thanks for the q -> I've moved this to #64 so that we can have a directus specific discussion there without filling up this docs ticket. I've posed a question to you there, can you go, check and reply?
Hey guys, kudos for the great work π. Would love to see doc sections about creating your own sign in/out page, and using nuxt-auth in connection with a db (I am using Prisma). Thanks!
Hey @tmlmt π
Thanks β€οΈ We actually have documentation for custom sign in pages, check it out here: https://github.com/sidebase/nuxt-auth#custom-sign-in-page
Oh! Thank you π @BracketJohn
@BracketJohn Would be really stoked for Sanctum support as well! Check out this repo if you need any inspiration. It works great for Sanctum Auth: https://github.com/amrnn90/breeze-nuxt.
π‘Idea: A small explanation about using/extending useFetch
and providing and refreshing tokens
Currently looking into Interceptors from https://nuxt.com/docs/api/composables/use-fetch#example
await useFetch(
() => 'https://api/items/test', {
async onRequest({ request, options }) {
if (process.client && Date.now() > session.value.accessTokenExpires) {
await getSession()
}
options.headers = options.headers || {}
options.headers.authorization = `Bearer ${session.value.accessToken}`
},
transform: ({ data }) => data[0],
}
)
I have no clue if calling getSession()
here when token is expired is the correct way and place :)
would like to have an example on how to use with auth0
would like to have an example on how to use with auth0
Hi @awacode21 π
We don't currently have an official one, however another developer posted a super helpful guide on using it! If you are struggling have a look at it: https://github.com/sidebase/nuxt-auth/issues/228#issuecomment-1455111997
Otherwise you can always refer to the offical NextAuth documentation. The code stays pretty such the same in our project aside from calling the function .default()
on the Provider instance when setting it up:
https://next-auth.js.org/providers/auth0
are there any plans made yet for supporting laravel sanctum?
are there any plans made yet for supporting laravel sanctum?
Hi @jaimyborgman π
Currently I do not know when we would be able to get around to this. None of the core maintainers use Laravel, therefore requiring some setup on our ends to even be able to start looking into how to integrate it.
I did some digging around on the internet and found a somewhat maybe helpful article on how someone integrated Laravel Sanctum with NextAuth. It could potentially be a stepping stone for you to get started on it!
If you have any findings feel free to share with them us, so we can help you when your stuck or maybe collaborate on writing some docs for it!
Describe the feature
Add documentation and optionally sample code for:
credential
signIn directly (see [2])Additional information
[1] attempt at strapi from discord user
Hum+
(thanks π )[2] passing username and password to signIn, e.g., to use on ytour own page: