Skip to content

A web microservice allowing users to authenticate via osu! and Discord before being redirected to Google Forms with pre-filled authentication fields.

License

Notifications You must be signed in to change notification settings

vncommunityleague/vcl-form-auth

Repository files navigation

Vietnam Community League - Form Auth

A web microservice allowing users to authenticate via osu! and Discord before being redirected to Google Forms with pre-filled authentication fields.

forked and rewritten from ThePoon's form auth https://git.cartooncraft.fr/osufrlive/form-auth

Example

Configuration

soon:tm:

Deployment

Using Bun

git clone https://github.com/vncommunityleague/vcl-form-auth.git
cd vcl-form-auth
bun install
  • Build and run the server:
bun run build
bun run start

Verifying the token

In your Google Forms response sheet, open the Apps Script and add the following code:

const BASE_AUTH_URL = "https://auth.hoaq.works";

function verify(formId, verifyToken, osuId, osuUsername, country, performancePoint, globalRank, countryRank, discordId, discordUsername) {
    return UrlFetchApp.fetch(`${BASE_AUTH_URL}/forms/${formName}/verify`, {
        contentType: "application/json",
        payload: JSON.stringify({
            osu_id: osuId,
            osu_username: osuUsername,
            country: country,
            performance_point: performancePoint,
            global_rank: globalRank,
            country_rank: countryRank,
            discord_id: discordId,
            discord_username: discordUsername,
            verify_token: verifyToken,
        }),
    }).getContentText();
}

Replace BASE_AUTH_URL by your deployment URL. Add a column and fill it with the following formula:

=VERIFY("example", J2, B2, C2, D2, E2, F2, G2, H2, I2)

About

A web microservice allowing users to authenticate via osu! and Discord before being redirected to Google Forms with pre-filled authentication fields.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published