From b2fa49126c70327494445bfef88b54fca5b959d8 Mon Sep 17 00:00:00 2001 From: lcaohoanq Date: Fri, 26 Sep 2025 07:33:01 +0700 Subject: [PATCH] fix: add sample environment variables and update README for Okta integration --- mvc-login/.env.sample | 4 + mvc-login/.gitignore | 196 ++++++++++++++++++++++++++++++++++++++++++ mvc-login/README.md | 2 +- 3 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 mvc-login/.env.sample create mode 100644 mvc-login/.gitignore diff --git a/mvc-login/.env.sample b/mvc-login/.env.sample new file mode 100644 index 0000000..b1deee1 --- /dev/null +++ b/mvc-login/.env.sample @@ -0,0 +1,4 @@ +CLIENT_ID=your_client_id +CLIENT_SECRET=your_client_secret +DOMAIN=your_domain_url +ISSUER="https://${DOMAIN}/" \ No newline at end of file diff --git a/mvc-login/.gitignore b/mvc-login/.gitignore new file mode 100644 index 0000000..c7187f9 --- /dev/null +++ b/mvc-login/.gitignore @@ -0,0 +1,196 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + + +# Created by https://www.gitignore.io/api/git,java,maven,eclipse,windows + +### Eclipse ### + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +### Eclipse Patch ### +# Eclipse Core + +# JDT-specific (Eclipse Java Development Tools) + +# Annotation Processing + +.sts4-cache/ + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### Maven ### +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +.mvn/wrapper/maven-wrapper.jar + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Some additional ignores (sort later) +*.DS_Store +*.sw? +.#* +*# +*~ +bin +build +target +*.sublime-* +/scratch +.gradle +README.html +.exercism + +src/main/resources/application-prod.yml +logs/ +.env + +performance-results/ \ No newline at end of file diff --git a/mvc-login/README.md b/mvc-login/README.md index dea4074..3949d82 100644 --- a/mvc-login/README.md +++ b/mvc-login/README.md @@ -14,7 +14,7 @@ This sample demonstrates: ### Auth0 Dashboard 1. On the [Auth0 Dashboard](https://manage.auth0.com/#/clients) create a new Application of type **Regular Web Application**. -1. On the **Settings** tab of your application, add the URL `http://localhost:3000/login/oauth2/code/auth0` to the **Allowed Callback URLs** field. +1. On the **Settings** tab of your application, add the URL `http://localhost:3000/login/oauth2/code/okta` to the **Allowed Callback URLs** field. 1. On the **Settings** tab of your application, add the URL `http://localhost:3000/` to the **Allowed Logout URLs** field. 1. Save the changes to your application settings. Don't close this page; you'll need some of the settings when configuring the application below.