egregors / passkey

🔑 Go library for implementing WebAuthn services 🗝️
MIT License
12 stars 2 forks source link

multi domain #25

Open gedw99 opened 1 month ago

gedw99 commented 1 month ago

SO that we can support multi-domains I guess we could start to detect the incoming domains used by the proxies etc using
https://github.com/pires/go-proxyproto , so that we dont need to pass ENV variables anymore.

It seems plausible that we can do this to the current _example code, and not need another example like we spoke about a few days ago.

The _example is currently working with many domains and sub domains using Caddy. But, until proxy detection is done cant really do more there.

Will get it deploying to fly.io with the caddy stuff embedded and check multi-domain using real domains tomorrow, with hardcoded ENV, and then when proxy detection is done can try again.

@egregors let me know if you want the Makefile I used to get this working. Its just a wrapper on the current one.

egregors commented 1 month ago

Yep, sure! I'd like to take a look.

On one hand, I like the idea of supporting multi-domain in the _example app. On the other hand, I’d like to keep it as simple as possible so that the application doesn’t scare users away with its complexity

gedw99 commented 1 month ago

so true. The big test of a project on GitHub is, does it work the first time after I put in 1 minutes of effort.

Let's see if https://github.com/pires/go-proxyproto works and is aligned with KISS and YAGNI principle..