Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Auth Section. DOC-2256 #835

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

seanparkross
Copy link
Collaborator

@seanparkross seanparkross commented Jan 6, 2025

Description 📝

DOC-2256

Reworks and restructures Auth Section.

  • Edited Basics section to direct users to the right place.

  • Adds a FAQ section

  • Mostly adheres to the plan. Deviates by keeping tutorials in their relevant sections.

  • Brings in relevant tutorials from recipes section.

  • Brought in and edited JWT configuration section from v2. Needs @hgiasac to go over it to make sure that it is still accurate for v3.

  • Not sure if x-hasura-role as a header in webhook mode is a thing. @hgiasac to please confirm.

  • Needs more examples in permissions. Not for this PR.

Quick Links 🚀

/auth

@seanparkross seanparkross self-assigned this Jan 6, 2025
@hasura-bot
Copy link
Contributor

hasura-bot commented Jan 6, 2025

Redirects 🔀

Hey, @robertjdominguez & @seanparkross — the following redirects will be needed for deployment:

# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/_category_.json
location = /docs/3.0/auth/authentication/_category_.json {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/index/
location = /docs/3.0/auth/authentication/index/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/jwt/index/
location = /docs/3.0/auth/authentication/jwt/index/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/jwt/providers/
location = /docs/3.0/auth/authentication/jwt/providers/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/jwt/setup/
location = /docs/3.0/auth/authentication/jwt/setup/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/role-emulation/.wip
location = /docs/3.0/auth/authentication/role-emulation/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/webhook/index/
location = /docs/3.0/auth/authentication/webhook/index/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/_category_.json
location = /docs/3.0/auth/authorization/_category_.json {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/index/
location = /docs/3.0/auth/authorization/index/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/inherited-roles/.wip
location = /docs/3.0/auth/authorization/inherited-roles/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/_category_.json
location = /docs/3.0/auth/authorization/permissions/_category_.json {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/aggregation-permissions/.wip
location = /docs/3.0/auth/authorization/permissions/aggregation-permissions/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/backend-only/.wip
location = /docs/3.0/auth/authorization/permissions/backend-only/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/column-level-permissions/.wip
location = /docs/3.0/auth/authorization/permissions/column-level-permissions/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/column-presets/.wip
location = /docs/3.0/auth/authorization/permissions/column-presets/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/common-roles-auth-examples/.wip
location = /docs/3.0/auth/authorization/permissions/common-roles-auth-examples/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/disabling-root-fields/.wip
location = /docs/3.0/auth/authorization/permissions/disabling-root-fields/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/index/.wip
location = /docs/3.0/auth/authorization/permissions/index/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/permissions-operators/.wip
location = /docs/3.0/auth/authorization/permissions/permissions-operators/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/permissions-summary/.wip
location = /docs/3.0/auth/authorization/permissions/permissions-summary/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/row-fetch-limit/.wip
location = /docs/3.0/auth/authorization/permissions/row-fetch-limit/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/permissions/row-level-permissions/.wip
location = /docs/3.0/auth/authorization/permissions/row-level-permissions/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/quickstart/.wip
location = /docs/3.0/auth/authorization/quickstart/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authorization/roles-variables/.wip
location = /docs/3.0/auth/authorization/roles-variables/.wip {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/jwt/_category_.json
location = /docs/3.0/auth/authentication/jwt/_category_.json {
    return 301 https://$host/docs/3.0/auth/jwt/_category_.json;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authentication/1-auth0/
location = /docs/3.0/recipes/authentication/1-auth0/ {
    return 301 https://$host/docs/3.0/auth/jwt/tutorials/integrations/1-auth0/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authentication/2-aws-cognito/
location = /docs/3.0/recipes/authentication/2-aws-cognito/ {
    return 301 https://$host/docs/3.0/auth/jwt/tutorials/integrations/2-aws-cognito/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authentication/3-firebase/
location = /docs/3.0/recipes/authentication/3-firebase/ {
    return 301 https://$host/docs/3.0/auth/jwt/tutorials/integrations/3-firebase/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authentication/4-clerk/
location = /docs/3.0/recipes/authentication/4-clerk/ {
    return 301 https://$host/docs/3.0/auth/jwt/tutorials/integrations/4-clerk/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/jwt/setup-test-jwt/
location = /docs/3.0/auth/authentication/jwt/setup-test-jwt/ {
    return 301 https://$host/docs/3.0/auth/jwt/tutorials/setup-test-jwt/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authorization/1-simple-user-permissions/
location = /docs/3.0/recipes/authorization/1-simple-user-permissions/ {
    return 301 https://$host/docs/3.0/auth/permissions/tutorials/1-simple-user-permissions/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authorization/2-public-access-role/
location = /docs/3.0/recipes/authorization/2-public-access-role/ {
    return 301 https://$host/docs/3.0/auth/permissions/tutorials/2-public-access-role/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authorization/4-service-account/
location = /docs/3.0/recipes/authorization/4-service-account/ {
    return 301 https://$host/docs/3.0/auth/permissions/tutorials/4-service-account/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/webhook/_category_.json
location = /docs/3.0/auth/authentication/webhook/_category_.json {
    return 301 https://$host/docs/3.0/auth/webhook/_category_.json;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/webhook/special-roles/
location = /docs/3.0/auth/authentication/webhook/special-roles/ {
    return 301 https://$host/docs/3.0/auth/webhook/tutorials/special-roles/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/auth/authentication/webhook/setup/
location = /docs/3.0/auth/authentication/webhook/setup/ {
    return 301 https://$host/docs/3.0/auth/webhook/webhook-mode/;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authentication/_category_.json
location = /docs/3.0/recipes/authentication/_category_.json {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authentication/index/
location = /docs/3.0/recipes/authentication/index/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authorization/_category_.json
location = /docs/3.0/recipes/authorization/_category_.json {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}
# TEST ME: https://stage.hasura.io/docs/3.0/recipes/authorization/index/
location = /docs/3.0/recipes/authorization/index/ {
    return 301 https://$host/docs/3.0/OG-FILE-WAS-DELETED-REPLACE-ME-WITH-NEW-LOCATION;
}

@hasura-bot
Copy link
Contributor

@seanparkross Thanks for your PR! I've assigned @robertjdominguez to review it.

Copy link

cloudflare-workers-and-pages bot commented Jan 6, 2025

Deploying ddn-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d62ee2
Status: ✅  Deploy successful!
Preview URL: https://9e42a507.v3-docs-eny.pages.dev
Branch Preview URL: https://sean-doc-2256-update-auth-se.v3-docs-eny.pages.dev

View logs

@hasura-bot
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 46.4%, saving 215.58 KB.

Filename Before After Improvement Visual comparison
static/img/auth/console-authorization-screen-noauth-mode.png 464.95 KB 249.37 KB -46.4% View diff

212 images did not require optimisation.

@seanparkross seanparkross requested a review from hgiasac January 8, 2025 13:31
@seanparkross seanparkross marked this pull request as ready for review January 8, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants