Skip to content

Overwrite state query parameter #628

Open

Description

@baloghbence0915

Hi there,

I'm wondering would it be possible to overwrite totally the value of state queryparameter in the final URL?
Because of several reasons I'm not able to pass a simple string value, which would be required for the given API, what I want to use.

I'm able to do such a thing:

hello.init(
    {
        'network': {
              ...
              login: (p) => {
                  p.qs.state = someCustomValue;
              }
        }
    }
);

But in this case, when I set string or null value for someCustomValue I get the following errors:
TypeError: Cannot create property 'oauth' on string 'I am a string'
TypeError: Cannot set property 'oauth' of null

hello.js line: 365:

    // Add the oauth endpoints
    p.qs.state.oauth = provider.oauth;

Version: 2.0.0-4

In summary, my current URL looks like this:

https://login.api.com/auth/authentication/connect/authorize?
nonce=MyNonce
&client_id=MyClientId
&response_type=code
&redirect_uri=https%3A%2F%2Fgateway%2Flogin
&state=%7B%22client_id%22%3A%22MyClientId%22%2C<....>2C%22oauth_proxy%22%3A%22%2Foauthproxy%22%7D
&scope=openid

And I'd like to look like this:

https://login.api.com/auth/authentication/connect/authorize?
nonce=MyNonce
&client_id=MyClientId
&response_type=code
&redirect_uri=https%3A%2F%2Fgateway%2Flogin
&state=MyCustomStringValueHere
&scope=openid

Thanks in advance,
Bence

Activity

  1. LakshmikanthanC commented on Sep 21, 2025

    @LakshmikanthanC

    #628 i am interesting to work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions