Comments (3)
@Ksm125 Ended up doing the same yes to append custom state variable to the query string.
I used inheritance though because I used the plain OpenIDConnect
in another connections so I tended not to directly patch It but after all It's the same Idea 👨🏻💻
module OmniAuth
module Strategies
class Custom < OmniAuth::Strategies::OpenIDConnect
option :name, 'custom'
def new_state
state = if options.state.respond_to?(:call)
if options.state.arity == 1
options.state.call(env)
else
options.state.call
end
end
if request.params['state']
state = request.params['state']
end
session['omniauth.state'] = state || SecureRandom.hex(16)
end
end
end
end
Thanks 🚀
from omniauth_openid_connect.
Hey, Did you get any luck with this ?
from omniauth_openid_connect.
Hey, Did you get any luck with this ?
@mazoonit yes, so i ended up just doing a monkey patch of the library with this :
module OmniAuth
module Strategies
# Override of the OpenIDConnect strategy to include the query string in the redirect_uri
class OpenIDConnect
# override of the redirect_uri method to include to dynamically detect the correct redirect_uri
def redirect_uri
callback_url
end
end
end
end
from omniauth_openid_connect.
Related Issues (20)
- OpenID-provider without `userinfo_endpoint`
- Uninitialized constant json::jws::unknownalgorithm HOT 1
- Pitfalls setting up OIDC with ADFS HOT 2
- Why should the logout path be relative to request_path
- Possible bug when upgrading to 0.7.0 and openid_connect to 2.2.0 HOT 2
- When using jwks_uri, default value fails becuase it's not a URI
- OmniAuth::Strategies::OpenIDConnect::CallbackError, csrf_detected | Invalid 'state' parameter HOT 3
- Authentication failure! no implicit conversion of Hash into String (version 0.6.1) HOT 3
- Migration guide from gitlab-omniauth-openid-connect to this gem? HOT 4
- Problem using microsoft oauth2 as provider because of dynamic issuer HOT 22
- Could not authenticate you from [My Provider name] because "Unknown" HOT 3
- Actioncontroller::InvalidAuthenticityToken with omniauth_openid_connect and omniauth-rails_csrf_protection HOT 1
- How not to send the `state` parameter? HOT 21
- Getting a routing error after initialization HOT 3
- Back-channel Single Sign Out Support
- Disable SSL verification
- Clever SSO: clever-initated login with no state, redirect to /oauth/authorize with state HOT 2
- invalid_grant :: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token on authorize request HOT 5
- https_proxy ignored for `token_endpoint` connections HOT 1
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 omniauth_openid_connect.