Content pfp
Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions

Sam pfp
Sam
@sammdec.eth
If I need to verify a user who is connecting to my mini-app that their fid I’m receiving in the context is legit, what is the go to way of doing this these days on farcaster? I’m seeing AuthKit but also signIn in the frame SDK?
1 reply
0 recast
2 reactions

dylan pfp
dylan
@dylsteck.eth
technically the best way to do this is using sdk.actions.signIn from the frame sdk, which uses SIWF/AuthKit under the hood and you get the exact same response data back
1 reply
0 recast
1 reaction

Sam pfp
Sam
@sammdec.eth
Ok awesome and does this happen seamlessly or requires a click to trigger the sign flow
1 reply
0 recast
1 reaction

dylan pfp
dylan
@dylsteck.eth
you choose whenever you want to call sdk.actions.signIn and as soon as you call it the UX is: - on web, a toast immediately pops up asking you to confirm SIWF on your phone & once you do you can proceed into the mini app - on mobile, SIWF happens behind the scenes(eg. no manual approval button needed from the user) & so this basically happens instantly
1 reply
0 recast
3 reactions

Sam pfp
Sam
@sammdec.eth
This is really good to know. Have you come across useful way to persist the auth state so api calls for users can retrieve specific data
1 reply
0 recast
1 reaction

dylan pfp
dylan
@dylsteck.eth
glad that can be helpful! and yeah here’s a great example in the frames v2 template(I do this in my mini apps too) — the client calls SIWF and then takes the response and verifies it on the server using Next Auth. then you should have a persistent auth session with a JWT you can use for gated actions or API calls with user-specific data
1 reply
0 recast
1 reaction