OAuth with Figma itself

I’m working on an app that has both a plugin and a web app (which uses the REST API).
For the REST API we can do OAuth with Figma and that’s how I authenticate my users.

Is there an easier way to call my own server and authenticate the user from the plugin? Or do I need to implement OAuth like with a 3rd even when using the Figma account for authentication?

I don’t think there is an easy way to do this unfortunately.

1 Like

@Michael_Gubik How did you solve it at the end?
@Gleb Can we follow what’s suggested here? OAuth with Plugins | Plugin API

Yep, that’s a relatively new guide, and that’s how it’s done.

Thanks! Is there a github sample/ plugin boilderplate for it?

I don’t know

@Gleb Actually what I wanted to do isn’t to read users’ google sheets data or other google data, but instead for my server to store certain details of users’ figma file. What’s the best way to do that?

I don’t think anyone mentioned google sheets or anything like this? It’s all about Figma files. Figma has REST API, and you can use it to access and store Figma files.

@Gleb mentioned here: OAuth with Plugins | Plugin API

OAuth with Plugins

In this section, we’ll look at how to build a Figma plugin that uses a 3rd-party service which the user needs to authenticate to. For example, you might want to write a plugin that uses Google authentication to read data from one of the user’s private Google spreadsheets.

Gotcha! There wouldn’t be any difference in doing this for a third-party service vs Figma itself. So if you actually need to implement this in a plugin, this is the guide to follow.

1 Like