Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS App Router - Server-Side Compatibility #80

Open
renchris opened this issue Jul 11, 2023 · 2 comments
Open

NextJS App Router - Server-Side Compatibility #80

renchris opened this issue Jul 11, 2023 · 2 comments

Comments

@renchris
Copy link

Hello,

I'm looking to use this library in my NextJS app router project. Is there any way to make and use this library to be server-side environment compatible?

This library is client-side per the description: @github/webauthn-json is a client-side Javascript library, however, the application logic for WebAuthN authentication is server-side, so the usage is currently not usable.

@renchris
Copy link
Author

The current error I am with is

Unhandled Runtime Error
Error: navigator is not defined

on

const credential = await create({

@lgarron
Copy link
Contributor

lgarron commented Jul 12, 2023

I'm looking to use this library in my NextJS app router project. Is there any way to make and use this library to be server-side environment compatible?

Do you have a specific goal for this?

This library is designed specifically for client WebAuthn authentication, without any server-specific functionality. I don't know of a use case for a server to act like a WebAuthn client.

If you want to perform server-side WebAuthn logic in JavaScript, you may want to look at another library like: https://simplewebauthn.dev/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants