Profile APIs require token to be the authentication
You need to use the ProfilesClientProvider
to pass in the FuturePass ID Token
import { ProfilesClientProvider } from '@futureverse/asset-register-react/profiles'
const Page = FC<{ children: React.ReactNode }> = ({
children,
}) => {
const getFuturepassIdToken = async () => <YOUR_FUTUREPASS_ID_TOKEN>
return (
<ProfilesClientProvider
url={process.env.NEXT_PUBLIC_ASSET_REGISTRY_API_URL}
authorizationToken={getFuturepassIdToken}>
{children}
</ProfilesClientProvider>
)
}
import {ProfilesClient} from '@futureverse/asset-register/profiles'
const pc = new ProfilesClient({
authorizationToken: async ()=> futurepassIdToken,
url: AR_GRAPHQL_URL
})
GraphQL API requires Futurepass ID Token as the authorization header
authorization: <FUTUREPASS_ID_TOKEN>