Login to prismic-cli with SSO

We are starting to build using slice machine and it's great. So far we've been using a personal account to make progress but are at the point of building out real pages. Internally we use Okta for authentication on the prismic account. This means we don't have access to a password and cannot log in to the prismci-cli to upload slice models.

Pasting the model.json into the prismic UI (JSON Editor) works but we lose out on the incredible slice machine workflow, among other things. We considered simply doing our first page with the manual-upload slices. Unfortunately, this means once SSO is supported for prismic-cli login, another migration will be required from manual slices to "shared slices".

I've got 2-ish questions...

  1. What would be involved in migrating content types (pages) using manual slices to shared slices later involve? Is it just deleting manual slices, uploading shares slices, and rebuilding pages, or is there a more clever approach?

  2. Is there a workaround so we can authenticate our SSO prismic account from the command line?

  • Maybe we can roll our own to upload sm models with the new Custom types API?
  • Maybe there is a way for us to create just one user for the company account that has a username and password so someone can prismic login with cli until SSO is supported?

Any advice is welcome :smiley:

Also, sorry if this has already been covered. I looked everywhere but haven't had any luck.


Okay, don't be too hard on me for this but I'm answering my own question. I was able to insert new shared slices via the new Custom Content API. It worked with the permanent token. We can write our own node or shell script to handle this for now :slight_smile:

Appreciate any updates you may have with regard to SSO login via prismic-cli since we'll eventually want to know which user made updates across a larger team. Appears to get that now we need user name and password.

Hi William,

Welcome to the community!

You've stumbled across 2 of the big discussion points for Slice Machine at the minute.

  1. Migrating Custom Types is being discussed here:

SSO isn't currently possible in the CLI, but I believe the team has some plans for it. I'll get the info from them and get back to you :slight_smile:

I talked with the team and it's not possible at the moment to login with SSO to the CLI.

The eventual plan is to use the browser (Slice Machine) to log in by default, and when this is possible it will support SSO like in the Prismic dashboard.

Great thank you! I had heard similar with regard to using a browser for SSO on the CLI. Really happy for this and super grateful the Custom Type API came to fruition when it did. Thanks for pointing me to the migration discussion, it will be really helpful as we move forward. You all are doing great work, thanks!

1 Like

Thanks for the kind words Will, it's greatly appreciated :slight_smile:

This was released in newer versions of Slice Machine.