Auth Library Suggestions
I’m currently developing a iOS app in Swift and I’m trying to use a WebAuth session, however it seems nextauth does not work with a native swift app. Any suggestions on what to use instead?
7 Replies
is the client a "dumb " client with a js/ts backend?
The web end will be yes (besides having other functionality besides just auth), the on device is native swift.
lucia then
Lucia
Validate bearer tokens
Lucia is an open source auth library that abstracts away the complexity of handling sessions.
a length-y message but should help you
Generate a basic lucia config
Somewhere else, manage user and create session
How to get the user?
User + session
I've got lucia pretty much setup, but the ASWebAuthenticationSession is looking for a callback url, which I dont seem to be getting.
https://gist.github.com/cnbrown04/4ad240958c5746f0b936d90c4e18c0b5 this is that swift code.