Skip to content

Commit 5a3d58b

Browse files
committed
Minor fixes
1 parent c8e601b commit 5a3d58b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

01-Login/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ The app will be served at [http://localhost:3000/](http://localhost:3000/).
2020

2121
To run the sample, make sure you have `docker` installed.
2222

23-
Rename `.env.example` to `.env` and populate it with the client ID, domain, secret, callback URL and audience for your
24-
Auth0 app. If you are not implementing any API you can use `https://YOUR_DOMAIN.auth0.com/userinfo` as the audience.
25-
Also, add the callback URL to the settings section of your Auth0 client.
23+
To run the sample with [Docker](https://www.docker.com/), make sure you have `docker` installed.
2624

27-
Register `http://localhost:3000/callback` as `Allowed Callback URLs` and `http://localhost:3000`
28-
as `Allowed Logout URLs` in your app settings.
25+
Rename the .env.example file to .env, change the environment variables, and register the URLs as explained [previously](#running-the-app).
2926

3027
Run `sh exec.sh` to build and run the docker image in Linux or run `.\exec.ps1` to build
3128
and run the docker image on Windows.

01-Login/server.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,18 @@ def __init__(self, error, status_code):
4141
self.status_code = status_code
4242

4343

44-
@APP.errorhandler(Exception)
44+
@APP.errorhandler(AuthError)
4545
def handle_auth_error(ex):
4646
response = jsonify(ex.error)
4747
response.status_code = ex.status_code
4848
return response
4949

50+
51+
@APP.errorhandler(Exception)
52+
def handle_auth_error(ex):
53+
response = jsonify(message=ex.message)
54+
return response
55+
5056
oauth = OAuth(APP)
5157

5258

0 commit comments

Comments
 (0)