Closed haanamomo closed 5 years ago
You should read docs rather than incomplete unofficial typings
any other authorization parameters may be provided
Find the right way to pass in state:
client.authorizationUrl({
scope: 'openid',
code_challenge: codeChallenge,
code_challenge_method: 'S256',
state: 'testtestme',
} as any)
That is not the right way with the upcoming official types being developed in #184, you don't need to pass as any
in those since AuthorizationParameters
not only enumerates all known to me today but also [key: string]: unknown;
making you able to pass in any parameter the way you should according to the official documentation.
The version I use is "@types/openid-client": "^3.1.6".
There is no [key: string]: unknown
in AuthorizationParameters
interface
I reiterate, once more, @types/openid-client
is not official and any issues you have with it should be directed at its authors.
Once #184 lands openid-client will bundle its own types and I will ask the authors of the incomplete types to retire it.
OK, I understand now, when the official type of openid-client releases, I will change the code. Thanks for reply!
I find that the
authorizationUrl
method would take the following parameterI cannot find a place to pass state to create the auth url, so now I just append state to the string
Is there a right way to pass state?