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

How to create a Google Authentication for Digital Garden #15

Open
t2hv33 opened this issue Dec 19, 2021 · 1 comment
Open

How to create a Google Authentication for Digital Garden #15

t2hv33 opened this issue Dec 19, 2021 · 1 comment

Comments

@t2hv33
Copy link

t2hv33 commented Dec 19, 2021

Hi @phartenfeller
How to put Google Authentication for Foam Gatsby?

Expected:

  1. When User access index page of Foam
  2. It will display popup Google Login (Admin will config which user have approved to see the data)

At 2) will have 2 cases
Case 1: All pages are not available for guests, Login is required to browse the pages.
Case 2: Public pages will be available for guest, hidden pages will require Login

Currently, have any quick walkthrough to deploy Case 1?
Best regards,

@phartenfeller
Copy link
Owner

Hi!

Because this is currently on Gatsby 3, it just generates static html for all the pages. So this is something you could achieve on your webserver or proxy, where the pages are served.

I use authelia in front of my webserver to require login to see any pages. If you want I can share my setup, but it is very specific to my stack(Traefik with docker-compose). Page based authentication and authorization could be tricky.

Gatsby 4 introduced server-side rendering. With that it should be possible, but I currently don't have the time to look into it. Gatsby 4 does also not feel ready yet for me because some plugins are not upgraded yet.

Best regards!

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