Skip to content

Commit

Permalink
Merge branch 'development' of github.com:FusionAuth/fusionauth-site i…
Browse files Browse the repository at this point in the history
…nto development
  • Loading branch information
fusionandy committed Oct 27, 2023
2 parents 6ae44c3 + ae332e6 commit 12cdb48
Show file tree
Hide file tree
Showing 26 changed files with 779 additions and 552 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/lambda-site-origin-request-handler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: lambda-site-origin-request-handler

env:
AWS_REGION: us-east-1

on:
push:
branches:
- development
paths:
- 'src/lambdas/site-origin-request-handler/src/index.mjs'
- 'src/lambdas/site-origin-request-handler/terraform/**'
pull_request:
branches:
- development
paths:
- 'src/lambdas/site-origin-request-handler/src/index.mjs'
- 'src/lambdas/site-origin-request-handler/terraform/**'

permissions:
id-token: write
contents: read

jobs:
deploy:
runs-on: fusionauth-standard
container: 752443094709.dkr.ecr.us-west-2.amazonaws.com/gha-runner-ubuntu-22.04:bootstrap-05
steps:

- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
src
- name: set aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-chaining: true
role-to-assume: arn:aws:iam::752443094709:role/github-actions
role-session-name: github-actions
aws-region: ${{ env.AWS_REGION }}

- name: setup terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.6.2

- name: terraform plan
if: github.event_name == 'pull_request'
working-directory: src/lambdas/site-origin-request-handler/terraform
shell: bash
run: terraform init && terraform plan

- name: terraform apply
if: github.event_name == 'push'
working-directory: src/lambdas/site-origin-request-handler/terraform
shell: bash
run: terraform init && terraform apply -auto-approve
6 changes: 3 additions & 3 deletions .github/workflows/publish-site-redirect-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches:
- development
paths:
- 'src/lambdas/fusionauth-site-origin-handler/data/redirects.json'
- 'src/lambdas/site-origin-request-handler/data/redirects.json'

permissions:
id-token: write
Expand All @@ -34,6 +34,6 @@ jobs:
aws-region: ${{ env.AWS_REGION }}

- name: upload file to s3
working-directory: src/lambdas/fusionauth-site-origin-handler/data
working-directory: src/lambdas/site-origin-request-handler/data
run: |
aws s3 cp ./redirects.json s3://fusionauth-dev-us-east-1-artifacts/lambda/fusionauth-site-origin-handler/redirects.json
aws s3 cp ./redirects.json s3://fusionauth-dev-us-east-1-artifacts/lambda/site-origin-request-handler/redirects.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ node_modules
.savant/cache

astro/.astro

# Local .terraform directories
**/.terraform/*
2 changes: 1 addition & 1 deletion astro/src/components/Aside.astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const bgColor = bgColors[type];
<div class="title not-prose flex align-text-bottom font-bold uppercase" aria-hidden="true">
<span class="icon mb-2 pr-2">
<svg xmlns="http://www.w3.org/2000/svg" class="inline" viewBox={viewBox} width={16} height={16}>
<path class="fill-slate-800 {nodark ? '' : 'fill-slate-200'}" fill-rule="evenodd" d={d}></path>
<path class:list={["fill-slate-800", nodark ? '' : 'dark:fill-slate-200']} fill-rule="evenodd" d={d}></path>
</svg>
</span>
<span class="mb-2">{title}</span>
Expand Down
4 changes: 2 additions & 2 deletions astro/src/components/api/APIAuthentication.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const hrefMap = {
}
---
<div class="border-b-2 flex flex-row font-bold">
<div class="mr-2">
<div class="mr-2 not-prose">
{ icons.map(i =>
<a class="mx-1" href={hrefMap[i]}>
<a class="mx-1 no-underline" href={hrefMap[i]}>
<Icon name={i}/>
</a>
)}
Expand Down
6 changes: 3 additions & 3 deletions astro/src/components/nav/ArticleNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const categoryItems = [
const moreItems = [
{name: 'Quickstarts', href: '/docs/quickstarts'},
{name: 'SDKs', href: '/docs/v1/tech/client-libraries'},
{name: 'SDKs', href: '/docs/sdks'},
{name: 'Downloads', href: '/download'},
{name: 'Docs', href: '/docs/'},
{name: 'API Docs', href: '/docs/v1/tech/apis/'},
{name: 'Release Notes', href: '/docs/v1/tech/release-notes'},
{name: 'API Docs', href: '/docs/apis'},
{name: 'Release Notes', href: '/docs/release-notes'},
{name: 'Blog', href: '/blog/'},
{name: 'Developer Tools', href: '/dev-tools/'},
];
Expand Down
6 changes: 3 additions & 3 deletions astro/src/components/nav/BlogNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const categoryItems = [
const moreItems = [
{name: 'Quickstarts', href: '/docs/quickstarts'},
{name: 'SDKs', href: '/docs/v1/tech/client-libraries'},
{name: 'SDKs', href: '/docs/sdks'},
{name: 'Downloads', href: '/download'},
{name: 'Docs', href: '/docs/'},
{name: 'API Docs', href: '/docs/v1/tech/apis/'},
{name: 'Release Notes', href: '/docs/v1/tech/release-notes'},
{name: 'API Docs', href: '/docs/apis'},
{name: 'Release Notes', href: '/docs/release-notes'},
{name: 'Articles', href: '/articles/'},
{name: 'Developer Tools', href: '/dev-tools/'},
];
Expand Down
38 changes: 23 additions & 15 deletions astro/src/components/nav/ComposableNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const {sectionTitle, breadcrumbs, sectionTitleHref, categoryItems, moreItems, ca
</div>

<nav id="header-nav"
class="absolute hidden left-0 right-0 top-16 p-0 bg-slate-900 lg:bg-transparent lg:flex lg:h-auto lg:items-center lg:ml-auto lg:p-0 lg:static lg:dark:bg-transparent">
class="absolute hidden left-0 right-0 top-16 p-0 bg-slate-900 lg:bg-transparent lg:flex lg:h-auto lg:items-center lg:ml-auto lg:p-0 lg:static lg:dark:bg-transparent z-50">

<div class="menu-group-container group lg:float-left lg:inline-block lg:relative lg:mx-3 lg:z-50">
<div class="menu-group-container group lg:float-left lg:flex lg:flex-col lg:relative lg:mx-3 lg:h-full lg:justify-center">
<div class="menu-button-container hidden lg:block">
<div class="mb-1 text-base lg:mb-0">
<button type="button" class="font-medium gap-x-1.5 group hover:text-indigo-500 inline-flex text-base text-white"
Expand All @@ -56,24 +56,28 @@ const {sectionTitle, breadcrumbs, sectionTitleHref, categoryItems, moreItems, ca
</div>

<div
class="menu-content-container lg:origin-top-left lg:opacity-0 lg:group-hover:opacity-100 lg:group-hover:scale-100 lg:scale-[.25] lg:z-10 lg:mr-3 lg:absolute lg:duration-300 menu-content lg:transition lg:bg-white lg:-mt-1 lg:outline-none lg:right-0 lg:rounded-md lg:shadow-xl lg:text-base lg:top-10 lg:w-48"
class="menu-content-container lg:origin-top-left lg:opacity-0 lg:group-hover:opacity-100 lg:group-hover:scale-100 lg:scale-[.25] lg:z-10 lg:mr-3 lg:absolute lg:duration-300 menu-content lg:transition lg:bg-white lg:-mt-1 lg:outline-none lg:right-0 lg:rounded-md lg:shadow-xl lg:text-base lg:top-12 lg:w-48"
role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1" id="category-menu">
<ul class="mb-5 ml-4 lg:mb-0 lg:ml-0 lg:space-y-0 lg:flex lg:flex-col">
{categoryItems && categoryItems.map((item ,idx) =>
<li class:list={[
idx === 0 ? "lg:pt-4" : "lg:pt-2",
idx === categoryItems.length - 1 ? "lg:pb-4" : "lg:pb-2",
"lg:border-l-0 lg:hover:border-l-0 lg:block lg:font-medium lg:hover:text-indigo-500 lg:px-4 lg:text-slate-700 lg:text-sm",
"block border-l-2 border-slate-700 border-solid font-semibold hover:border-indigo-500 hover:border-l-2 hover:border-solid hover:ease-linear hover:text-indigo-500 hover:transition-colors px-3 py-2 relative text-base text-white"
"lg:border-l-0 lg:hover:border-l-0 lg:block lg:font-medium lg:hover:text-indigo-500 lg:px-0 lg:text-slate-700 lg:text-sm",
"block border-l-2 border-slate-700 border-solid font-semibold hover:border-indigo-500 hover:border-l-2 hover:border-solid hover:ease-linear hover:text-indigo-500 hover:transition-colors relative text-base text-white"
]}>
<a href={item.href}>{item.name}</a>
<a class:list={[
idx === 0 ? "lg:pt-4" : "lg:pt-2",
idx === categoryItems.length - 1 ? "lg:pb-4" : "lg:pb-2",
"block w-full px-3 lg:pl-4 py-2"]} href={item.href}
>
{item.name}
</a>
</li>
)}
</ul>
</div>
</div>

<div class="menu-group-container group lg:float-right lg:inline-block lg:relative lg:mx-3 lg:z-50">
<div class="menu-group-container group lg:float-right lg:flex lg:flex-col lg:relative lg:mx-3 lg:h-full lg:justify-center">

<div class="menu-button-container hidden lg:block">
<div class="mb-1 text-base lg:mb-0">
Expand All @@ -90,17 +94,21 @@ const {sectionTitle, breadcrumbs, sectionTitleHref, categoryItems, moreItems, ca
</div>

<div
class="menu-content-container lg:origin-top-right lg:opacity-0 lg:group-hover:opacity-100 lg:group-hover:scale-100 lg:scale-[.25] lg:z-10 lg:mr-3 lg:absolute lg:duration-300 menu-content lg:transition lg:bg-white lg:-mt-1 lg:outline-none lg:right-0 lg:rounded-md lg:shadow-xl lg:text-base lg:top-10 lg:w-48"
class="menu-content-container lg:origin-top-right lg:opacity-0 lg:group-hover:opacity-100 lg:group-hover:scale-100 lg:scale-[.25] lg:z-10 lg:mr-3 lg:absolute lg:duration-300 menu-content lg:transition lg:bg-white lg:-mt-1 lg:outline-none lg:right-0 lg:rounded-md lg:shadow-xl lg:text-base lg:top-12 lg:w-48"
role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1" id="more-menu">
<ul class="mb-5 ml-4 lg:mb-0 lg:ml-0 lg:space-y-0 lg:flex lg:flex-col">
{moreItems && moreItems.map((item, idx) =>
<li class:list={[
idx === 0 ? "lg:pt-4" : "lg:pt-2",
idx === moreItems.length - 1 ? "lg:pb-4" : "lg:pb-2",
"lg:border-l-0 lg:hover:border-l-0 lg:block lg:font-medium lg:hover:text-indigo-500 lg:px-4 lg:text-slate-700 lg:text-sm",
"block border-l-2 border-slate-700 border-solid font-semibold hover:border-indigo-500 hover:border-l-2 hover:border-solid hover:ease-linear hover:text-indigo-500 hover:transition-colors px-3 py-2 relative text-base text-white"
"lg:border-l-0 lg:hover:border-l-0 lg:block lg:font-medium lg:hover:text-indigo-500 lg:px-0 lg:text-slate-700 lg:text-sm",
"block border-l-2 border-slate-700 border-solid font-semibold hover:border-indigo-500 hover:border-l-2 hover:border-solid hover:ease-linear hover:text-indigo-500 hover:transition-colors relative text-base text-white"
]}>
<a href={item.href}>{item.name}</a>
<a class:list={[
idx === 0 ? "lg:pt-4" : "lg:pt-2",
idx === categoryItems.length - 1 ? "lg:pb-4" : "lg:pb-2",
"block w-full px-3 lg:pl-4 py-2"]} href={item.href}
>
{item.name}
</a>
</li>
)}
</ul>
Expand Down
6 changes: 3 additions & 3 deletions astro/src/components/nav/DevToolsNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const categoryItems = [
const moreItems = [
{name: 'Quickstarts', href: '/docs/quickstarts'},
{name: 'SDKs', href: '/docs/v1/tech/client-libraries'},
{name: 'SDKs', href: '/docs/sdks'},
{name: 'Downloads', href: '/download'},
{name: 'Blog', href: '/blog/'},
{name: 'API Docs', href: '/docs/v1/tech/apis/'},
{name: 'Release Notes', href: '/docs/v1/tech/release-notes'},
{name: 'API Docs', href: '/docs/apis'},
{name: 'Release Notes', href: '/docs/release-notes'},
{name: 'Articles', href: '/articles/'},
{name: 'Docs', href: '/docs/'},
];
Expand Down
3 changes: 0 additions & 3 deletions astro/src/components/nav/DocsNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ const categoryItems = [
const moreItems = [
{name: 'Quickstarts', href: '/docs/quickstarts'},
{name: 'SDKs', href: '/docs/sdks'},
{name: 'Downloads', href: '/download'},
{name: 'Blog', href: '/blog/'},
{name: 'API Docs', href: '/docs/apis'},
{name: 'Release Notes', href: '/docs/release-notes'},
{name: 'Articles', href: '/articles/'},
{name: 'Developer Tools', href: '/dev-tools/'},
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
const { feature } = Astro.props;
---
{feature && <><strong>Note:</strong>A paid plan is required to utilize {feature}.</>}
{!feature && <><strong>Note:</strong>A paid plan is required to utilize <slot></slot>.</>}
{feature && <><strong>Note:</strong> A paid plan is required to utilize {feature}.</>}
{!feature && <><strong>Note:</strong> A paid plan is required to utilize <slot></slot>.</>}

2 changes: 1 addition & 1 deletion astro/src/content/docs/apis/actioning-users.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Actioning Users
title: Actioning Users APIs
description: Learn how the FusionAuth API can be used to take actions on users
section: apis
---
Expand Down
2 changes: 1 addition & 1 deletion astro/src/content/docs/apis/audit-logs.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Audit Logs
title: Audit Logs APIs
description: The APIs for adding entries to, searching, and exporting the audit log
section: apis
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ First you need to set up an advanced registration form with two steps. The lambd

You will also add appropriate messaging to your theme.

<img src="/img/docs/extend/code/lambdas/self-service-reg-messages.png" alt="Self-Service registration example theme messages" width="600" role="bottom-cropped top-cropped" />
<img src="/img/docs/extend/code/lambdas/self-service-reg-messages.png" alt="Self-Service registration example theme messages" width="800" role="bottom-cropped top-cropped" />

Then you will supply the following lambda code for the validation

Expand All @@ -70,9 +70,9 @@ function validate(result, user, registration, context) {

When a user goes to register they will see this form step

<img src="/img/docs/extend/code/lambdas/self-service-reg-form-blank.png" alt="Self-Service registration example blank form step" width="600" role="bottom-cropped top-cropped" />
<img src="/img/docs/extend/code/lambdas/self-service-reg-form-blank.png" alt="Self-Service registration example blank form step" width="800" role="bottom-cropped top-cropped" />

When the user submits the wrong future auth provider FusionAuth will trigger the validation and supply the error message

<img src="/img/docs/extend/code/lambdas/self-service-reg-form-invalid.png" alt="Self-Service registration example invalid form step" width="600" role="bottom-cropped top-cropped" />
<img src="/img/docs/extend/code/lambdas/self-service-reg-form-invalid.png" alt="Self-Service registration example invalid form step" width="800" role="bottom-cropped top-cropped" />

Loading

0 comments on commit 12cdb48

Please sign in to comment.