Skip to content

[Feature] Local environment that supports connectors #276

@artemdemo

Description

@artemdemo

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:

  1. A request to run a backend function hits Apper's API
  2. Apper issues a short-lived server JWT
  3. Apper injects that real JWT as Base44-Service-Authorization and forwards the request to the Deno deployment
  4. The SDK inside the function extracts the token and uses it for all asServiceRole API calls back to Apper
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions