Skip to Content
On this page

This guide shows you how to sign users in to your dApp when it runs inside the MyDoge app. Popup sign-in and Google sign-in don’t work in MyDoge’s in-app browser, and DogeOS email and social sign-in isn’t available there; About the MyDoge In-App Browser explains why.

Sign In With the Wallet#

  1. Hide sign-in options that need a popup or Google when useWalletHost().isNativeHost is true.
  2. After the wallet connects, sign the user in with a server-issued challenge. Follow Sign Users In With Their Wallet; it works the same inside MyDoge and in an ordinary browser.
  3. Show the connected address clearly. If progress is tied to an address, tell users which wallet to use, because one person can have several MyDoge wallets.

If you call useDogeOSAuth().login() or reauthenticate() inside MyDoge, it rejects with DogeOSHostError.

If you already have accounts tied to email or X, let users link their wallet with the same signed challenge, and offer it as soon as the wallet connects.

Keep Your Own Sign-In Working#

If you keep your own sign-in, such as “Sign in with X” for your own accounts:

  1. Use a redirect flow, not a popup flow such as Firebase signInWithPopup.
  2. Save any state you need before redirecting. The redirect reloads your page.
  3. Leave out Google sign-in inside MyDoge.

X sign-in works as a full-page redirect: X’s sign-in pages stay inside MyDoge so the redirect comes back to your dApp, and the user signs in to X again there.