Giter VIP home page Giter VIP logo

Comments (9)

joeblew99 avatar joeblew99 commented on August 30, 2024

is there a CLi command to create the required hs256.json credrentials ?
Or some readme instructions ?

from papernet.

bobinette avatar bobinette commented on August 30, 2024

Indeed, it is not specified anywhere. I'll add that to the README 👍
I used https://mkjwk.org/ to generate it with the following:
image
setting the key id to whatever

from papernet.

joeblew99 avatar joeblew99 commented on August 30, 2024

ok. I grabbed the keypair resultset ( the middle pane).
slapped it in the hs256.json file.

Now getting further 👍

x-MacBook-Pro:papernet apple$ go run cmd/web/main.go
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /ping                     --> github.com/bobinette/papernet/gin.New.func3 (4 handlers)
[GIN-debug] GET    /auth/v2/me               --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] POST   /auth/v2/bookmarks        --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] GET    /auth/v2/teams            --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] POST   /auth/v2/teams            --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] DELETE /auth/v2/teams/:id        --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] POST   /auth/v2/teams/:id/invite --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] POST   /auth/v2/teams/:id/kick   --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
[GIN-debug] POST   /auth/v2/teams/:id/share  --> github.com/bobinette/papernet/gin.wrapH.func1 (4 handlers)
FATA[0000] could not instantiate google service          env=dev
exit status 1

from papernet.

bobinette avatar bobinette commented on August 30, 2024

Hmm oops, it seems I forgot to log the error here: https://github.com/bobinette/papernet/blob/master/cmd/web/main.go#L109
If you add it, the message will definitely be clearer

I think you are missing the google configuration to use google login. You need credentials to be able to start the server. I'll add that to the README as well, and when I have the time, make a no-auth version of it.

If you are using the front as well, I think you might be able to skip the google part already by:

I don't have much time to work on it these days, but I'll fix those as soon as I can, I'll let you know here 🙂

from papernet.

joeblew99 avatar joeblew99 commented on August 30, 2024

from papernet.

bobinette avatar bobinette commented on August 30, 2024

There is now a new login system based on email and password that you can use locally instead of the Google oauth system. It does not come with email confirmation and password reset but as it is intended to be used locally only (at least for now), I do not think those features are needed 🙂

To get rid of the google oauth provider, edit the configuration:

# other stuff

[oauth.google]
enabled=false

# other stuff

This should do the trick. Regarding the cli, it should work as long as you do not try to use the oauth sub-command. Let me know if you run into more problems, I'll fix them as soon as I can 🙂

from papernet.

joeblew99 avatar joeblew99 commented on August 30, 2024

ah nice. will make it easier to get going.

As far as email confirmation and 2 factor auth its pretty easy to add that these days actually.
i use twillo (sms), but also yubikey hardware.
email libs for golang are pretty good. https://github.com/emersion/go-imap is pretty solid.

from papernet.

bobinette avatar bobinette commented on August 30, 2024

I'm quite happy with Google auth in "production" so far, but if/when email confirmation is needed, I'll have a look at those 😉

from papernet.

joeblew99 avatar joeblew99 commented on August 30, 2024

ok. maybe laters then ..

from papernet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.