-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Summary
Currently we're not supporting call to get access token in local development. in other words following code will not work (in function):
const googleCalendarToken = await base44.asServiceRole.connectors.getAccessToken("googlecalendar");Why
I production:
- A request to run a backend function hits Apper's API
- Apper issues a short-lived server JWT
- Apper injects that real JWT as
Base44-Service-Authorizationand forwards the request to the Deno deployment - The SDK inside the function extracts the token and uses it for all
asServiceRoleAPI calls back to Apper - Apper validates the JWT signature and grants access
Locally:
Locally, the CLI dev server calls the Deno function directly - Apper is not in the loop. Since only Apper has the app's JWT secret, the dev server has no way to mint a valid service token. Without a real token, any asServiceRole call (connectors, entities, etc.) that hits Apper will fail authentication.
Proposed Solution
Run the whole environment locally (including connectors loop). In other words, issue all tokens in localhost dev server bypassing Apper.
cc @kfirstri
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog