app/models/auth_server.rb
##
# Get the redirection url for the initial step of authorizing the current user.
# The provided state_payload should be returned by the auth server.
# In this way you can keep the state of that single launch (obviously).
Get the redirection url for the initial step of authorizing the current user.
The provided state_payload should be returned by the auth server.
In this way you can keep the state of that single launch (obviously).
Get the redirection url for the initial step of authorizing the current user . The provided state_payload should be returned by the auth server . In this way you can keep the state of that single launch ( obviously ) .
def authorize_url(state_payload:)
    URI(authorization_endpoint).tap do |uri|
      uri.query = {
        client_id: client_id,
        redirect_uri: Rails.application.routes.url_helpers.launch_callback_url,
        scope: 'openid profile email phone address',
        response_type: 'code',
        state: Keypair.jwt_encode(state_payload),
        nonce: SecureRandom.uuid
      }.to_query
    end
  end
def authorize_url ( state_payload : ) URI ( authorization_endpoint ) . tap do | uri | uri . query = { client_id : client_id , redirect_uri : Rails . application . routes . url_helpers . launch_callback_url , scope : 'openid profile email phone address' , response_type : 'code' , state : Keypair . jwt_encode ( state_payload ) , nonce : SecureRandom . uuid } . to_query end end
Get the redirection url for the initial step of authorizing the current user.
Get the redirection url for the initial step of authorizing the current user .
state_payload
<not_specific>