Real world app using Fastify-DX, Solid.js, Auth0 and GraphQL

Overview

Fastify DX and Solid.js In the Real World

These are only the essentials to set up a "real world" application with Fastify DX, Solid.js, Auth0 and GraphQL. To read more about how, why etc. please refer to our blog post: Real World App using Fastify DX and Solid.js

This application connects to the GitHub GraphQL. We use Auth0 and a Social Identity Provider (GitHub) to log in to our App.

Requirements

Copy env.example to .env. Those variables are loaded when the server is started. There are a few steps needed for a full, working setup:

  1. Auth0 Single Page Application to handle the login on the website
  2. GitHub OAuth App to communicate with Auth0 securely and issue GraphQL API tokens
  3. Auth0 Machine to Machine Application to retrieve access tokens for the GitHub GraqhQL API through Auth0

Auth0 Single Page Application

This is the primary auth0 application we'll use. Create a new Single Page Application in Auth0 and copy the client id and domain into .env, (variables starting with VITE_AUTH0_). Make sure you add http://localhost:8080 to the Allowed Callback URL, Allowed Web Origin and Allowed Origin.

GitHub OAuth App

Go into your Developer Settings and create a new OAuth App. Name, homepage etc. are not important, but the Authorization callback URL needs to point to your Auth0 Tenant. You can get the domain in your Auth0 application settings: https://<auth0-app-DOMAIN>.auth0.com.

Auth0 Social Connections

Go to Authentication -> Social and Create Connection. Select GitHub. Pick a name and copy the Client ID from your GitHub OAuth App. Go back to the GitHub OAuth App settings and click Create a new client secret. Copy that into the Client Secret in the Auth0 connection details. For this app we only need public_repo as a permission. You should enable Sync user profile attribute at each login to retrieve the user details from GitHub.

After saving, go back to your Single Page Application, to the tab Connections and add the GitHub Social Connection. You should disable the Database connection to avoid issues later.

Auth0: Machine to Machine Application

We use a Machine to Machine Application to retrieve the Access Token for the GitHub API through Auth0. This can't be done directly on the client.

Go back to Applications, Create Application and pick Machine to Machine Application. Enter a name, and copy the client id, secret and domain into .env (variables starting with AUTH0_). Go to APIs and Authorize the application to the Auth0 Management API. The only permission needed is read:user_idp_tokens.

Install & Run

  pnpm install
  pnpm dev
You might also like...

An app to organize and track your downloaded anime.

An app to organize and track your downloaded anime.

My Personal List An app to organize and track your downloaded anime. Usage • Features • Installation and Running • Building 🚀️ Usage and Conventions

Dec 29, 2022

It's a react-redux app with firebase used as the database

This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template. Available Scripts In the project directory, you can r

Jun 25, 2022

React.js todo app with authorization, Testing: Cypress(e2e), UI (Chakra UI), Eslint, prettier, git hooks

React TypeScript template with Vite This is a React + TypeScript boilerplate built with Vite. What's inside? ReactJS Vite TypeScript Jest Testing Libr

Jan 28, 2022

Wordle is a simple word game created by a Software Engineer Wardle. I made this simple helper app to show remaining words in each step.

Wordle is a simple word game created by a Software Engineer Wardle. I made this simple helper app to show remaining words in each step.

Wordle Helper Wordle is a simple word game created by a Software Engineer Wardle. I made this simple helper app to show remaining words in each step.

Oct 24, 2022

Simple but super overengineered wake-on-lan web app.

webwol An absolutely overengineered web application for waking up network devices via wake on lan. Demo Untitled.mp4 Setup You might want to deploy th

Mar 4, 2022

A desktop live wallpaper app made for Mac.

A desktop live wallpaper app made for Mac.

Wallpieperi A desktop live wallpaper app made for Mac. Status: Alpha Alpha build is going to be released this saturday, however all the code will be a

Oct 13, 2022

Remove all client-side JS from your Nuxt 3 app

Nuxt Zero JS Remove all client-side JS from your Nuxt 3 app ✨ Changelog ▶️ Online playground Features ⚠️ nuxt-zero-js is under active development. ⚠️

Jan 3, 2023

A template to use GoLang Lorca package to make desktop applications using webview and Svelte for the frontend,

Svelte Lorca Template A starter project for building modern cross-platform desktop apps in Go, HTML, and Svelte. This project is a fork of lorca-ts-re

Jun 19, 2022

Using Cypress with Vite, React, TypeScript, MSW and react-query

Vie + Cypress + MSW + react-query Demo Example of using Cypress with Vite, MSW and react-query. Uses the appReady pattern to signal to Cypress when th

Jul 16, 2022
This repo contains a fully configured nuxt 3 instance supporting TypeScript and several considered as useful libraries, fully configured and ready to use in real world projects!

Nuxt 3 Starter This repo contains a fully configured nuxt 3 instance supporting TypeScript and several considered as useful libraries, fully configure

Ali Soueidan 26 Dec 27, 2022
Fastify boilerplate with Vite & Vitest

Fastify boilerplate with Vite & Vitest Enhance your Fastify DX with the power of Vite & Vitest. Features ⚡ All the power of Vite (Next Generation Fron

Emmanuel Salomon 31 Dec 13, 2022
🏎 A tiny and fast GraphQL client for Vue.js

villus Villus is a finger-like structures in the small intestine. They help to absorb digested food. A small and fast GraphQL client for Vue.js. This

Abdelrahman Awad 639 Jan 8, 2023
⚡️ Minimal GraphQL Client + Code Generation for Nuxt

nuxt-graphql-client ⚡️ Minimal GraphQL Client + Code Generation for Nuxt ⚡️ Minimal GraphQL Client + Code Generation for Nuxt Features Zero Configurat

Dizzy 245 Dec 27, 2022
⚡️ Minimal GraphQL Client + Code Generation for Nuxt3

nuxt-graphql-client ⚡️ Minimal GraphQL Client + Code Generation for Nuxt ⚡️ Minimal GraphQL Client + Code Generation for Nuxt Documentation Features Z

Conrawl Rogers 245 Dec 27, 2022
A Nuxt.js module that injects a server route to serve the GraphQL Playground

@pin-pon/nuxt-graphql-playground A Nuxt.js module that injects a server route to serve the GraphQL Playground Setup Add @pin-pon/nuxt-graphql-playgrou

Pin-Pon 3 Sep 22, 2022
Mobile app development framework and SDK using HTML5 and JavaScript. Create beautiful and performant cross-platform mobile apps. Based on Web Components, and provides bindings for Angular 1, 2, React and Vue.js.

Onsen UI - Cross-Platform Hybrid App and PWA Framework Onsen UI is an open source framework that makes it easy to create native-feeling Progressive We

null 8.7k Jan 4, 2023
Third-Party Authentication (Github) demo Vue 3 + TypeScript + Pinia app using Supabase

vue-supabase-tpa-demo This template should help get you started developing with Vue 3 in Vite. Recommended IDE Setup VSCode + Volar (and disable Vetur

Mac (Maciej Pędzich) 25 Nov 21, 2022
Wiki.js | A modern and powerful wiki app built on Node.js

A modern, lightweight and powerful wiki app built on NodeJS Official Website Documentation Requirements Installation Demo Change Log Feature Requests

requarks.io 19.5k Jan 5, 2023