Concepts

Sign-in in previews

Verified against Soffi ·

Most apps open on a sign-in screen. In a preview, that screen is in the way: your designers don't have test accounts for every role, the app's data comes from a Data Twin rather than your real backend, and a reviewer opening a link shouldn't have to log in to your app before they can look at a button.

So when Soffi sets up a Project whose app has its own sign-in, it turns that sign-in off for previews. Everyone who opens a Workspace lands in the app already signed in as a single stand-in user, and the Data Twin still provides the data that user sees.

What Soffi changes

During setup, Soffi adds a small, self-contained change to your app's code: a switch, plus a few hooks where your app checks who is signed in, so that it answers with the stand-in user instead. The switch is only on when the app runs in Soffi. Anywhere else, the code behaves exactly as it did before.

Your sign-in pages themselves stay in place. You can still open them in a preview and work on them like any other screen.

Because the change is part of the Project's setup, every Workspace inherits it. Nobody has to turn sign-in off again for their own work.

It never reaches your repository

The sign-in change exists only inside Soffi. When you Ship a Workspace, Soffi leaves it out of what it pushes, so your pull requests contain only the work you did. If Soffi ever can't separate the two cleanly, it refuses to push and tells you why, rather than sending the sign-in change along with your work.

Soffi also uses the sign-in change for the before and after screenshots it can post on pull requests. It applies the sign-in change to both versions of the app it captures, so pages behind sign-in show their real content. When a pull request changes your sign-in code itself, or the change doesn't fit cleanly onto both versions, Soffi leaves it out of that comparison, so its screenshots may show your sign-in page rather than the page behind it. See PR visuals.

What this means for security

Turning sign-in off applies only to the copy of your app running in a Soffi preview. It doesn't change your app's sign-in anywhere you deploy it, and it doesn't change who can open a Workspace: that's still decided by membership in your Soffi Organization and its roles.

Was this helpful?