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
Sub - Issue with Bearer Token and Store Creation in OpenFGA
I'm currently working with OpenFGA and I have a custom bean that overrides the default OpenFGA bean. The goal is to ensure that a store is created only once. When creating the store, if it doesn't already exist, it should be automatically created, and the store ID should be added to other AuthorizationModel APIs.
However, I'm running into an issue. I keep getting the error message "invalid bearer token." The M2M token is being created successfully, but for some reason, it’s not being properly intercepted when the store is created within the custom bean. This is causing the token to be invalid during the API calls.
As a workaround, I tried switching to direct API calls using the RestClient to call OpenFGA APIs. The RestClient provides an option for requestInterceptor(), but I’m struggling to set the M2M token in the header correctly. Despite my efforts, the token is still not being passed correctly, and I continue to face authentication issues.
Has anyone encountered a similar problem or have any advice on how to intercept and set the M2M token in the header when using the RestClient? Any insights or solutions would be greatly appreciated!
Thanks in advance!
Version of SDK
v0.4.0
The text was updated successfully, but these errors were encountered:
Description
Sub - Issue with Bearer Token and Store Creation in OpenFGA
I'm currently working with OpenFGA and I have a custom bean that overrides the default OpenFGA bean. The goal is to ensure that a store is created only once. When creating the store, if it doesn't already exist, it should be automatically created, and the store ID should be added to other AuthorizationModel APIs.
However, I'm running into an issue. I keep getting the error message "invalid bearer token." The M2M token is being created successfully, but for some reason, it’s not being properly intercepted when the store is created within the custom bean. This is causing the token to be invalid during the API calls.
As a workaround, I tried switching to direct API calls using the RestClient to call OpenFGA APIs. The RestClient provides an option for requestInterceptor(), but I’m struggling to set the M2M token in the header correctly. Despite my efforts, the token is still not being passed correctly, and I continue to face authentication issues.
Has anyone encountered a similar problem or have any advice on how to intercept and set the M2M token in the header when using the RestClient? Any insights or solutions would be greatly appreciated!
Thanks in advance!
Version of SDK
The text was updated successfully, but these errors were encountered: