Hello - this may be a simple init issue on my part, but sessions don't seem to be working properly i...
c

callstack1

over 2 years ago
Hello - this may be a simple init issue on my part, but sessions don't seem to be working properly in my app (passwordless w/ Flask). When the current session's access token expires, I receive a blank page with the message:
{"message":"try refresh token"}
But I never make it past this point, and I have to manually navigate back to our sign in UI to generate a new magic link. Any ideas what I might be doing wrong here? Here's my frontend init, declared globally in our main js file:
supertokens.init({
  appInfo: {
    apiDomain: "https://staging.<my_url>",
    apiBasePath: "/auth",
    appName: "..."
  },
  recipeList: [
    supertokensSession.init(),
    supertokensPasswordless.init(),
  ],
});
And my backend init (minus custom smtp server recipe):
init(
    app_info=InputAppInfo(
        app_name="...",
        api_domain="https://staging.<my_url>",
        website_domain="https://staging.<my_url>",
        api_base_path="/auth",
        website_base_path="/auth"
    ),
    supertokens_config=SupertokensConfig(
        connection_uri="http://supertokens:3567",
        api_key="<api_key>"
    ),
    framework='flask',
    recipe_list=[
        dashboard.init(api_key="<api_key>"),
        session.init(),
        passwordless.init(
            flow_type="MAGIC_LINK",
            contact_config=ContactEmailOnlyConfig(),
            email_delivery=
      ...
And finally my middleware initialization, if that helps:
Middleware(app)
CORS(
    app=app,
    origins=[
        "https://staging.<my_url>"
    ],
    supports_credentials=True,
    allow_headers=["Content-Type"] + get_all_cors_headers(),
)