Comments (6)
+1
from goth.
@rickb777 there is a minor difference in the first code what on first looks like the same:
the second req.URL.Query().Get(":provider")
is with a semicolon before the provider
So think it has to do with resolving the provider value in side the different http engines
@markbates binding against mux is indeed a problem , but I know when we would change this it would break applications using this default behavior . Any thoughts on how to decouple this?
I also changed the GetProviderName function to a custom function to do my own implementation when using Macaron , but this does indeed not remove the gorilla/mux dependency on the project.
from goth.
This coupling has been there for a few years, and to remove it would break existing apps. If someone can figure out a way to do this would breaking backward compatibility I'm all ears.
from goth.
@markbates what about a v2 sub-package in-line with Go module design?
Some common functionality could be moved into an internal package and exported by both while the v2 package could be built without being coupled to gorilla/mux and the old package could remain as is.
from goth.
As for the backwards compatible approach Both gorilla/mux and httperouter can use context.Content
to find route parameters. I've done a simple context.Values check in my "mid" middleware.
from goth.
Has there been any follow-up on this? Would be nice to remove the dependency on gorilla packages (both Store
and url param functionality), and make it a bit more pluggable. Could also have sub-packages to still allow the use of gorilla packages in a seamless way. I don't think there is an easy way to be backwards compatible, but might be worth a v2
version, with an interface/context approach.
Would @markbates or other maintainers be open to supporting something like this? I could potentially help with PR's and whatnot.
EDIT: /cc @techknowlogick
from goth.
Related Issues (20)
- Apple auth with scopes not working correct
- Mastodon OAuth implementation has no handling for the email field.
- wecom provider has bug. cached client will be using for everybody....
- has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
- How to check that users are logged in?
- mailru error
- Bitbucket Authentication Error HOT 1
- Microsoft authentication error
- authentik provider HOT 1
- Group Retrieval For Google Sessions
- Passing parameters between the login and the callback functions HOT 6
- Epic Games Provider
- Could not get name from Google with goth HOT 2
- deprecated lib HOT 1
- Alternative Session option
- global_name in RawData not used in discord provider
- Just a question: how may I tell "goth" library what proxy server it has to use?
- When should you generate the code challenge for a `goth`/`gothic` PKCE OAuth flow? HOT 1
- LinkedIn deprecated OAuth login in favour of OIDC HOT 3
- Session is not saved due to logout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goth.