Skip to main content

PrettyGoodPing: Now with GitLab and Google Auth

·361 words·2 mins·
GitLab prettygoodping OAuth2 perl
Table of Contents
❤️ It's great to see you here! I'm currently available on evenings and weekends for consulting and freelance work. Let's chat about how I can help you achieve your goals.

SSL Expiry Alerts

"The key to success. Where is it?" by stoneysteiner is licensed under CC BY 2.0 .

The Background
#

A couple of months ago, I announced that prettygoodping.com had gone live. It’s a service which allows you to get an overview of all of your SSL certificates and their expiry dates.

SSL Expiry Alerts

Initially I offered only GitHub authentication, which makes the service available to a large group of people, but it excludes folks who don’t already have a GitHub account. I wanted to expand the reach of the site and for this reason OAuth2 authentication via GitLab and Google is now also available. This new setup allows you to add multiple identities to your account.

Once you are logged in, you can add additional identities on your profile page.

SSL Expiry Alerts

This means that you can have one account which allows you to log in via GitHub, Google and GitLab. That leaves some you options in case you lose access to one of your accounts etc.

If you’re signing in for the first time, start with the OAuth2 provider of your choice on the signup page:

SSL Expiry Alerts

The Technical Stuff
#

I implemented the authentication via https://metacpan.org/pod/Mojolicious::Plugin::OAuth2. I was previously using https://metacpan.org/pod/Mojolicious::Plugin::Web::Auth, which is quite handy in that it will fetch user info for you after completing authentication, but it has a bug in the Google implementation and the last release was in 2019.

Initially I thought about sending a pull request to Mojolicious::Plugin::Web::Auth and asking the author for a new release, but Mojolicious::Plugin::OAuth2 supports mocking, which is really handy in my testing flow. I can now do proper, mocked logins and account creation in both Perl tests and my Playwright tests. It ended up being a better fit for me. My test coverage went up as well.

SSL Expiry Alerts

Codecov tells me that my coverage is currently over 95%, so I’m able to deploy changes with a lot of confidence right now.

Give it a Try
#

If you already have a https://www.prettygoodping.com account, feel free to add more identities to it. If you don’t have one yet, please sign up for the Beta and let me know what you think at GitHub or via support@wundersolutions.com.


Related

Find Expiring TLS/SSL Certs
·2536 words·12 mins
prettygoodping TLS SSL Go curl perl Let's Encrypt
Opening Files Quickly from Inside vim
·191 words·1 min
vim perl Programming Open::This CPAN
Observing Network Traffic with LWP::ConsoleLogger::Everywhere
·469 words·3 mins
CPAN perl LWP::ConsoleLogger LWP::UserAgent UserAgent