WOW totally love the authentication module.
BACKEND
import { authentication } from 'wix-members-backend';
const token = await authentication.generateSessionToken(email);
FRONTEND
import { authentication } from 'wix-members';
const promise = authentication.applySessionToken(data.sessionToken);