Identity Provider Login with API

I’m working on an application that uses the API for some operations, and I’ve been able to get along with using my PAT just fine, but the token is very short-lived, and I’d like to obtain the token programatically rather than through the UI. I use Google as my Identity provider, and the docs suggest passing in the UUID for this provider for the redirection: Mender API docs

How to I obtain the UUID needed to get this to work?

Hi @dburns,

Sorry, I can’t properly follow. The PATs are definitely not short-lived, and meant exactly for that use case. Is your application distributed or scaling out over so many devices that it needs to be automatically created?

Greetz,
Josef

That’s what I saw in the Docs, but the only token I have under “My Profile” is my session token, which expires when the page times out. I can use that easily enough for testing things out for a few minutes, but it won’t work for my application.

I’m building a UI for use internally, and ideally users would still use their own profile (signing in via Google) for making these calls.

Hi @dburns,

The paragraph following Session token is called Personal access token management, and allows you to create a number of long-lived tokens for exactly the use case that you described. If it is not there, then chances are that you are running an outdated version of the backend.

Greetz,
Josef

I’m currently on a Trial plan, is it possible that I don’t have access to that due to being on a trial?

Thats really strange. I just created a test account in trial state, and it looks like this

I’ll ping people to see what might be going on here.

Any movement on this? Could it be because I created my account using Google?

Hi @dburns

Sorry, I was busy travelling last week. Yes, this indeed the feedback that I got from the developers. PATs are not available for SSO-based accounts. The workaround would be to add a username/password based user to your account (you can do so under User Management), and that one can have PATs then.

Greetz,
Josef

I attempted to do that with my existing email, but it looks like I can’t register the same email twice. Also, my organization has SSO enabled company-wide, so for users to be able to access this application we will need this functionality. Is there a plan for this to be implemented?

Hi @dburns,

I’m not aware of any change plans here. If your SSO provider is Google, then a simple trick would be to add a +something suffix. Like my.name+menderapi@gmail.com, which will be delivered to your standard inbox.

Greetz,
Josef