Skip to content

Commit

Permalink
chore: update readme and templating
Browse files Browse the repository at this point in the history
  • Loading branch information
KotaHusky committed Apr 1, 2024
1 parent d49e022 commit 8e6ef8f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 14 deletions.
52 changes: 45 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,54 @@ This is a demo project that shows how to use the Microsoft Authentication Librar

## Tech Stack

- [Azure Web Apps](https://azure.microsoft.com/en-us/services/app-service/web/)
- [Docker Hub](https://hub.docker.com)
- [GitHub Actions](https://github.com/features/actions)
- [MSAL-React](https://www.npmjs.com/package/@azure/msal-react)
- [NextJS](https://nextjs.org)
- [Nx](https://nx.dev)
- [TailwindCSS](https://tailwindcss.com)
- [Azure Web Apps](https://azure.microsoft.com/en-us/services/app-service/web/) - Cloud webapp hosting
- [Azure B2C](https://learn.microsoft.com/en-us/azure/active-directory-b2c/overview) - Identity and access management with local and social identity providers.
- [Docker Hub](https://hub.docker.com) - Docker container registry.
- [GitHub Actions](https://github.com/features/actions) - CI/CD pipeline.
- [GitHub CLI](https://cli.github.com) - Programmatic access to GitHub.
- [MSAL-React](https://www.npmjs.com/package/@azure/msal-react) - Microsoft Authentication Library for React.
- [NextJS](https://nextjs.org) - React framework for server-side rendering and static site generation.
- [Nx](https://nx.dev) - Extensible dev tools for monorepos.
- [TailwindCSS](https://tailwindcss.com) - Utility-first CSS framework for rapid UI development.

## Setup

### GitHub

Setup the GitHub CLI:

```bash
# Homebrew
brew install gh
```

```bash
# Windows
choco install gh
```

Login to GitHub:

```bash
# GitHub CLI
gh auth login
```

Create a new repository using the template:

```bash
# GitHub CLI
gh repo create msal-react --template KotaHusky/msal-react --private
```

Setup the repository secrets and variables using the template files:

```bash
# GitHub CLI
gh secret set --env-file .env.template-gha-secrets
gh variable set --env-file .env.template-gha-variables
```

### Azure Web App

Setup your Azure Web App ...
Expand Down
12 changes: 5 additions & 7 deletions apps/msal-react-demo/.env.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser
NEXT_PUBLIC_AZURE_B2C_AUTHORITY=
NEXT_PUBLIC_AZURE_B2C_CLIENT_ID=
NEXT_PUBLIC_AZURE_B2C_FLOW_EDIT_PROFILE
NEXT_PUBLIC_AZURE_B2C_FLOW_FORGOT_PASSWORD
NEXT_PUBLIC_AZURE_B2C_FLOW_SIGN_UP_SIGN_IN
NEXT_PUBLIC_AZURE_B2C_REDIRECT_URI=/auth
NEXT_PUBLIC_AZURE_B2C_FLOW_EDIT_PROFILE=
NEXT_PUBLIC_AZURE_B2C_FLOW_FORGOT_PASSWORD=
NEXT_PUBLIC_AZURE_B2C_FLOW_SIGN_UP_SIGN_IN=
NEXT_PUBLIC_AZURE_B2C_REDIRECT_URI=
NEXT_PUBLIC_AZURE_B2C_TENANT_ID=
NODE_VERSION=20

NEXT_PUBLIC_
NODE_VERSION=
5 changes: 5 additions & 0 deletions apps/msal-react-demo/.env.template-gha-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Template for creating GitHub Actions secrets
AZURE_APPSERVICE_PUBLISHPROFILE=
DOCKERHUB_REPO=
DOCKERHUB_TOKEN=
DOCKERHUB_USERNAME=
10 changes: 10 additions & 0 deletions apps/msal-react-demo/.env.template-gha-variable
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser
# Template for creating GitHub Actions variables
NEXT_PUBLIC_AZURE_B2C_AUTHORITY=
NEXT_PUBLIC_AZURE_B2C_CLIENT_ID=
NEXT_PUBLIC_AZURE_B2C_FLOW_EDIT_PROFILE=
NEXT_PUBLIC_AZURE_B2C_FLOW_FORGOT_PASSWORD=
NEXT_PUBLIC_AZURE_B2C_FLOW_SIGN_UP_SIGN_IN=
NEXT_PUBLIC_AZURE_B2C_REDIRECT_URI=
NEXT_PUBLIC_AZURE_B2C_TENANT_ID=
NODE_VERSION=

0 comments on commit 8e6ef8f

Please sign in to comment.