codehakase / golang-gin Goto Github PK
View Code? Open in Web Editor NEWBuild a Golang app with the Gin framework, and authenticate with Auth0 + JWT
License: MIT License
Build a Golang app with the Gin framework, and authenticate with Auth0 + JWT
License: MIT License
It would be great to see this tutorial incorporate Docker and possibly have it leverage docker-compose.
Hi @codehakase ,
first of all I would like to thank you for your work and effort put into the tutorial. I really think it is super well explained, pointing in the right direction in every step and I was really excited about following it because you managed to make a clear explanation on how to accomplish the whole thing but I got stuck in one of the first steps just trying to display the first .html view that we have in views folder.
I found an issue related in the gin-gonic repository reporting the same problem:
Inability to use '/' for static files
but I couldn't figure out how to apply any of the proposed solutions.
Also I have to add that I am trying to make it work with docker using as a base the code of:
Gin with Go running on Docker.
In case that you want to check my code you can find it here:
https://github.com/develaper/docker-go-gingonic-react-tutorial/blob/master/src/main.go
Please let me know if you have any advise about how to proceed from here or if you need any other info.
Thanks for your time.
I've been working on a similar setup with Gin and React. I see how the auth is being used to control the api responses but have you found a way to use authentication in Gin to control the javascript that is being served?
From my understanding, the user is receiving the entire frontend regardless of their auth-status.
What if you only wanted to serve the joke button after a user has been successfully logged in?
Hi, I am not able to login to the app. I have gone through the tutorial and comb my code, but have no luck. This is the error I am getting.
Failed to load resource: the server responded with a status of 401 (Unauthorized)
Error parsing token: Invalid issuer.
any ideas?
Using Go 1.11, Gin and React
Getting
Uncaught TypeError: c.render is not a function
any idea why @codehakase?
Hi there know it has to be related to scopes at this point, could you provide what scopes that you added in auth0.
I'm using your project to learning some new techniques.
Very convenient that I've using the exactly the same tools that you are.
I can log in no problems, just saying that I am not authorize to see the content.
But I'm the administrator/dev.
Hi,
Thanks for this project, it's a very good learning way ;)
After setting up my Auth0 account, I can login to Joke App, but when try to list Jokes, nothing appear and show that on go console :
Error parsing token: token contains an invalid number of segments
[GIN] 2018/04/25 - 09:13:51 | 401 | 70.616µs | ::1 | GET /api/jokes
Any idea what wrong ?
Thanks !!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.