arrow_back PlanetGraph Login+ docs

PlanetGraph Login+ demo

Try the client-side JavaScript widget and inspect the signed login result returned to the browser.

Sign in

<div id="planetgraph-login"></div>
<script src="https://planetgraph.ai/widgets/login-plus.js"></script>
<script>
  PlanetGraphLogin.mount('#planetgraph-login', {
    appId: 'a0fd5753-2519-4a7a-8801-768cbbd4fb39',
    state: 'demo_hzuuexa9gjr_msi76uqn',
    resultMode: 'web_message',
    buttonText: 'Try PlanetGraph Login+',
    planetGraphOrigin: 'https://planetgraph.ai',
    allowedOrigins: ['https://planetgraph.ai'],
    onSuccess(result) {
      console.log(result)
    }
  })
</script>

Returned result

The widget calls onSuccess after validating the message origin, app ID, and state.

Complete a Login+ flow to see the returned payload here.