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
This ticket is an alternative approach instead of #181
We will use an internal Nextjs API endpoint and then use an API key stored as environment variable to authenticate the core API.
Validation:
screenshot of frontend with a user page.
Tech steps:
in lib/api make a user folder
in user, make a getUser.ts and updateUser.ts files
This files should have a function in each, getUser and updateUser.
These functions should call the appropriate endpoint as shown in quivr.
Then make a hook in the user folder called useUser. This should expose getUser and updateUser functions as done in Quivr.
The text was updated successfully, but these errors were encountered:
mattzcarey
changed the title
[Auth BE] AANext JS Backend I am authenticated with the core api
[Auth BE] AAUser I can access the unauthenticated Apigateway endpoints from the frontend using a Next API proxy route
Sep 4, 2023
Description:
This ticket is an alternative approach instead of #181
We will use an internal Nextjs API endpoint and then use an API key stored as environment variable to authenticate the core API.
See this code in quivr for the pattern. https://github.com/StanGirard/quivr/tree/main/frontend/lib/api
We create a bunch of functions in the api folder split by domain. For each domain we expose the function as part of a hook.
Validation:
screenshot of frontend with a user page.
Tech steps:
in lib/api make a user folder
in user, make a getUser.ts and updateUser.ts files
This files should have a function in each, getUser and updateUser.
These functions should call the appropriate endpoint as shown in quivr.
Then make a hook in the user folder called useUser. This should expose getUser and updateUser functions as done in Quivr.
The text was updated successfully, but these errors were encountered: