You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HasMetadata() function in OAuth2Client isn't working right. It should tell us with a true if there's stuff in the Metadata field. But, it's doing the opposite. It's supposed to say true when there's something in Metadata, not when it's empty.
Reproducing the bug
Start by creating an OAuth2Client instance with some data in the Metadata field. For example:
client:=OAuth2Client{
Metadata: &Metadata{ /* Assume this is correctly initialized with data */ },
}
Next, call the HasMetadata() method on this instance to check if the metadata is considered set:
hasMeta:=client.HasMetadata()
Check the result of hasMeta. Despite having filled the Metadata field in step 1, you'll surprisingly find hasMeta is false.
fmt.Println("Does client have metadata:", hasMeta) // Expected: true, Actual: false
Relevant log output
No response
Relevant configuration
No response
Version
v2.2.0
On which operating system are you observing this issue?
Preflight checklist
Ory Network Project
No response
Describe the bug
The HasMetadata() function in OAuth2Client isn't working right. It should tell us with a true if there's stuff in the Metadata field. But, it's doing the opposite. It's supposed to say true when there's something in Metadata, not when it's empty.
Reproducing the bug
Relevant log output
No response
Relevant configuration
No response
Version
v2.2.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
Obvious bug in the current implementation:
The text was updated successfully, but these errors were encountered: