Pass handles authentication via a set of server routes managed by the pass_routes hook. This hook automatically handles server responses for logging in, logging out, signing up, resetting passwords, and verifying emails, meaning you do not need to manually create these API routes.
To enable Pass, you must include pass_routes in your src/hooks.server.ts file using the sequence function from @sveltejs/kit/hooks.
import { sequence } from '@sveltejs/kit/hooks';
import { pass_routes } from '@drop-in/pass';
import { drop_hook } from '@drop-in/plugin/hook';
// pass_routes handles auth authentication and the auth routes.
// drop_hook ensures drop-in.config.js is read and applied to globals.
export const handle = sequence(pass_routes, drop_hook);