Skip to content

Audience is taking an array, but I needed it to take one value as string. #12

@yashwp

Description

@yashwp

I have a situation, where I need to send the audience as String instead of List<String>. How can I do it, can you please share some workaround?

var claimSet = JwtClaim(
      issuer: issuer,
      subject: '',
      audience: [issuer],
      otherClaims: {'DATA': encodedPayload},
      maxAge: Duration(days: kReleaseMode ? 1 : 7),
 );

claimSet.audience = issuer; // Giving error - 'audience' can't be used as a setter because it's final.

I tried to update the audience key but IDE itself giving an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions