Skip to main content
Home

Built and signed on GitHub Actions

This package works with Browsers
This package works with Browsers
JSR Score
94%
Published
2 years ago (0.1.2)
function loginUser
loginUser(
userName: string,
path: URL | string,
): Promise<WebSocket>

Login an existing user.

Examples

Example 1

document.getElementById("login")!.addEventListener("click", async (e)=> {
  e.preventDefault()
  const userName = (document.getElementById("username")! as HTMLInputElement).value
  await loginUser(userName, new URL("ws://localhost:5180/login"))
})

Parameters

userName: string

Specifies the unique user name that is assigned to a user

path: URL | string

a url to the login endpoint of your socketauthn api

Return Type

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.