[Announcement] Collect Form Data Securely with the VGS Netlify add-on

Hey there, is this addon still supported? I’ve been trying to figure out why it fails when I try to authenticate. netlify addons:create vgs followed by netlify addons:auth vgs opens up a tab in my browser with the error auth error, please try again by running "netlify vgs-auth". That doesn’t seem to be a valid command in the netlify cli. I can’t figure out what’s wrong with the request.

Hey there, @lauraschultz :wave:

Are you still having issues with this? It looks like this thread has been a bit quiet since you shared this.

If you are still having issues, can you please share your Netlify site ID so we can look into this further? Thank you :slight_smile:

Hello, @hillary

I’m working on trying out the VGS plugin with Netlify and it seems to be getting some kind of scope error maybe?

When I run through the steps on vgs site I get an error.

I ran the following commands:

netlify addons:create vgs

It had an output message with the following:

Starting the setup for "vgs add-on"

 The vgs add-on has the following configurable options:
.----------------------------------------------------------------------------------.
|                               vgs add-on settings                                |
|----------------------------------------------------------------------------------|
| Setting Name |                  Description                  |  Type  | Required |
|--------------|-----------------------------------------------|--------|----------|
| path         | Path to page with form (leave blank for root) | string | false    |
'----------------------------------------------------------------------------------'

 Lets configure those!

 - Hit enter to confirm value or set empty value
 - Hit ctrl + C to cancel & exit configuration

? path - Path to page with form (leave blank for root) 
Add-on "vgs" created for MY_PROJECT

VGS addon is created. Run "netlify addons:auth vgs" to authenticate.

I hit enter and did the default of “root page” to start.

Next I ran this command:

netlify addons:auth vgs

The output here is the following (and it automatically opens the URL)

Opening vgs add-on admin URL:

https://netlify-addon-genpop.apps.verygoodsecurity.com/auth-redirect/#auth=A_JWT_FOR_SOMETHING

The encoded JWT has the following:

{
  "site_id": "f04fc21b-b973-4e8d-9a70-6f364cdb92ec",
  "account_id": "5ea1fd6f2fae121f31fd2f5d",
  "remote_id": "b1c63992-647c-4443-a6d9-56be9449e77c"
}

I see two things kind of “off” on the page when I follow the link:

  1. URL redirects to https://netlify-addon-genpop.apps.verygoodsecurity.com/callback?siteId=f04fc21b-b973-4e8d-9a70-6f364cdb92ec&error=invalid_request&error_description=Invalid+scopes%3A+&state=
  2. Message at url is auth error, please try again by running "netlify vgs-auth"

I attempted to run the netlify vgs-auth however, it says that is not a cli command.

Any ideas?

maybe @Peter-VGS has some ideas?

Yes, I am still seeing the error, the same one that @Garry_Polley is having. My site ID is 13b39e5a-f349-45a1-9020-a3c0e0a40c4d. It would be great if you could take a look :slight_smile: Thanks!

hey @Garry_Polley and @lauraschultz - we’ve been working through this with VGS and we do believe the issue is fixed. Could you try again and let us know if its working or still problematic? thanks!!

@perry The integration allowed me to authenticate and move forward.

I’m now testing out how the data flows. So far so good.

1 Like

fantastic. please keep us in the loop.

Hello again @perry . I may be filling things out incorrect, the add on does not appear to be actually injecting itself.

When I run the final recommend command:

netlify addons:config vgs --path /

It comes back with

➜  PROJECT git:(main) netlify addons:config vgs --path /
 Current "vgs add-on" Settings:
.------------------------------------------------------------------------------.
|                             vgs add-on settings                              |
|------------------------------------------------------------------------------|
| Setting Name | Current Value |                  Description                  |
|--------------|---------------|-----------------------------------------------|
| path         | Not supplied  | Path to page with form (leave blank for root) |
'------------------------------------------------------------------------------'

Updating vgs add-on config values...

  {
-   config: {},
-   env: Object { … },
-   id: 'b1c63992-647c-4443-a6d9-56be9449e77c',
-   snippets: Array [ … ],
+   path: '/',
  }

Add-on "vgs" successfully updated

I feel like maybe the id shouldn’t be getting removed.

When the final page actually loads it shows this message in the JavaScript I’d expect to be the VGS script:

<script>
          console.log('Hello there! Please run "netlify addons:config vgs --path /" to finish configuring addon');
        </script>

I’ve done a few deploys and cache breaks to see. No success so far. I’m going to see if I can set the ID in config update to see if that does anything.

what a roller coaster! :roller_coaster:

I did a “reinstall” and it seems good. Steps once it seemed to not be picking up:

  1. netlify addons:delete vgs
  2. netlify addons:create vgs
  3. netlify addons:auth vgs
  4. netlify addons:config vgs --path /

Now my page looks correct – minus my poor styling :smirk:

1 Like

Hi, @Garry_Polley. Thanks for sharing your solution and this will help others searching this forum for answers to similar issues (and our support team appreciates you taking the time to report your solution as well). :+1:

Hello again :wave: ,

It seems like the netlify addons:auth vgs is having issues again not authenticating. It seems to hang “forever” on the redirect to https://netlify-addon-genpop.apps.verygoodsecurity.com/auth-redirect/#auth=TOKEN

This last time it finally said it closed the connection.

How stable is VGS support for Netlify?

:thinking: Something is still a bit off. The auth works – even though it is timing out.

Now I end with a deployed page that says:

Hello there! Please run "netlify addons:config vgs --path /" to finish configuring addon

In the console logs – even after running said command and deploying multiple times. Any ideas? /cc @Peter-VGS

HI @Garry_Polley :wave:

Thanks for reaching out! I want to assure you we have seen your message. I have looped in the Support Engineers, and we will follow up on this thread with more information.

1 Like

Hi @Garry_Polley,

I was able to successfully deploy a site with VGS add-on just now. Are you still experiencing timeouts and getting errors in console log?

What’s interesting is when I netlify addons:auth vgs I was redirected to https://netlify-addon-genpop.apps.verygoodsecurity.com/guide?siteId=12345 which is different from the redirect you shared.

1 Like

@audrey Thank you for taking a look. Whenever I make the netlfy addons:auth vgs command I do eventually get redirected to the URL you are referencing. However, it never resolves and times out after about 2 minutes.

I’m not sure what to do next to get this working. I’ve tried the steps I posted previously that had worked – removing vgs, adding it again, authing, and then configuring. I can’t seem to reliably get past the auth stage of the steps.

Getting redirected to https://netlify-addon-genpop.apps.verygoodsecurity.com/guide?siteId=12345 sounds promising! Seems like auth is working.

Are you able to share the URL where the form is? If not, the site id works too. Thank you!

1 Like