The purpose of `type` & `client` in RWJS 4.x `<AuthProvider>

In the RedwoodJS 4.2 documentation, Self-hosted Authentication (dbAuth) | RedwoodJS Docs states that App.js needs to supply type & client to <AuthProvider> when using WebAuthn. However, only the dbAuth integration states anything about type & client for AuthProvider.

Working with dbAuth, it doesn’t appear that type or client are strictly needed. Do type & client play any role anymore in 4.x? Does the dbAuth documentation need to be updated to reflect a newer way of working? Or am I completely misunderstanding how type & client work in AuthProvider?

You’re right. The documentation needs to be updated. Do you want to give it a shot? No pressure :slight_smile:

I’m still a bit confused about the role of type & client. Can you confirm that type has no role at all anymore? I think client still may have a role if you want to access the WebAuthn Client API explicitly, but from what I can see that’s completely optional and the dbAuth code “does the right thing” without needing client passed in. Is this correct? I haven’t tried restructuring client from useAuth() yet to see if my understanding is correct.

If my understanding is correct, then yes, I’d be happy to take a crack at updating the dbAuth docs

Neither type nor client does anything anymore.

type is hardcoded when creating the db auth client.
client, which is the WebAuthN client, is passed into createDbAuthClient in auth.ts

If you look at the props that <AuthProvider> takes (by hovering it with your mouse) you’ll see that it only takes children and skipFetchCurrentUser