Skip to main content

Getting the stored data

import express from "express";import { verifySession } from "supertokens-node/recipe/session/framework/express";import UserMetadata from "supertokens-node/recipe/usermetadata";
let app = express();"/updateinfo", verifySession(), async (req, res) => {  const session = req.session;  const userId = session.getUserId();
  const { metadata } = await UserMetadata.getUserMetadata(userId);
  res.json({ preferences: metadata.preferences });});

By default, all users have an empty metadata object.

What type of UI do you want to use?
Custom UI
Pre built UI