Git Product home page Git Product logo

Comments (5)

rzrbld avatar rzrbld commented on July 24, 2024

Hi @dberardo OAuth2 standart implementation should support 3 endpoints:

authEndpoint    string = "/authorize"
tokenEndpoint   string = "/token"
endpointProfile string = "/userinfo"

/userinfo in your server could be an /user or /user-info or any other - cause of that you've got auth0 responded with a 404 trying to fetch user information
you can fork goth-provider-wso2 or goth-provider-oauth, change profile endpoint & rebulid.

from adminio-api.

energenious-eu avatar energenious-eu commented on July 24, 2024

Hi @dberardo OAuth2 standart implementation should support 3 endpoints:

authEndpoint    string = "/authorize"
tokenEndpoint   string = "/token"
endpointProfile string = "/userinfo"

/userinfo in your server could be an /user or /user-info or any other - cause of that you've got auth0 responded with a 404 trying to fetch user information
you can fork goth-provider-wso2 or goth-provider-oauth, change profile endpoint & rebulid.

Thanks @rzrbld for your prompt answer.

i was thinking to patch this line in the auth0 provider:

https://github.com/markbates/goth/blob/master/providers/auth0/auth0.go#L100

to basically hardcode the domain to my private auth server. That should work.

However, i am not a go expert so i should figure out how to import this code in the adminio-api source code.

Before going for this approach i wanted to check with the community if a more customizable option was available, but it seems like neither adminio.api, nor goth allow for custom / general purpose Oauth providers ... which really wonders me.

from adminio-api.

rzrbld avatar rzrbld commented on July 24, 2024

adminio call FetchUser at https://github.com/rzrbld/adminio-api/blob/master/src/oauth/oauth.go#L102
so you can make a stub FetchUser at https://github.com/markbates/goth/blob/master/providers/auth0/auth0.go#L86

from adminio-api.

energenious-eu avatar energenious-eu commented on July 24, 2024

ok, i will give it a try, although i have never programmed in Go in the past.

If i make something useful i can share it in a PR. Will keep you updated

from adminio-api.

dberardo avatar dberardo commented on July 24, 2024

just proposed a stub in here: #19

it works for my setup, but i was not able to test it for auth0.com as i dont have an account there.

from adminio-api.

Related Issues (9)

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.