Skip to content

Question: How to set audience #343

@fredrik-jansson-se

Description

@fredrik-jansson-se

Hi and thank you for maintaining this library, it's excellent!

I'm porting some old code and I can't figure out how to set the audience for the authorization call.

In our old code we do:

      let req = client
          .get(format!("{}/authorize", env_info.domain))
          .query(&[
              ("response_type", "code"),
              ("code_challenge", code_challenge),
              ("code_challenge_method", "S256"),
              ("client_id", env_info.client_id),
              ("redirect_uri", REDIRECT_URI),
              (
                  "scope",
                  "...
              ),
              ("audience", env_info.audience),
              ("state", state),
          ])
          .build()?;

I can't figure out how to do this using the oauth2 library. Any help is greatly appreciated.

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