user.ts

import { TokenPayload } from 'google-auth-library';

interface User {
  displayName: String;
  email: String;
  phoneNumber: Number;
  photoURL: String;
  uid: String;
}

export function getUserFromPayload(ticket: TokenPayload): User {
  return {
    displayName: ticket.name,
    email: ticket.email,
    phoneNumber: null,
    photoURL: ticket.picture,
    uid: ticket.sub
  };
}