Skip to content

Commit

Permalink
chore: rename "callback" to "redirect" for clarity
Browse files Browse the repository at this point in the history
See PR opengovsg/sgid-client#56 for more
details
  • Loading branch information
kwajiehao committed May 24, 2023
1 parent 5360984 commit eeb21ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/flask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Use the following details to register:
1. For "Name", enter any test name (there is no limit to the number of clients you can create)
2. For "Description", enter any
3. Under "Scopes", add "NAME"
4. Under "Callback URLs", add the following:
4. Under "Redirect URLs", add the following:

```
http://localhost:5001/api/callback
http://localhost:5001/api/redirect
```

### Running the server
Expand Down
4 changes: 2 additions & 2 deletions examples/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
client_id=os.getenv("SGID_CLIENT_ID"),
client_secret=os.getenv("SGID_CLIENT_SECRET"),
private_key=os.getenv("SGID_PRIVATE_KEY"),
redirect_uri="http://localhost:5001/api/callback",
redirect_uri="http://localhost:5001/api/redirect",
)


Expand Down Expand Up @@ -61,7 +61,7 @@ def get_auth_url():
return res


@app.route("/api/callback")
@app.route("/api/redirect")
def callback():
auth_code = request.args.get("code")
state = request.args.get("state")
Expand Down
2 changes: 1 addition & 1 deletion tests/mocks/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class MockConstants(NamedTuple):
client={
"client_id": "mockClientId",
"client_secret": "mockClientSecret",
"redirect_uri": "https://sgid.com/callback",
"redirect_uri": "https://sgid.com/redirect",
"public_key": mock_client_keys["publicKey"],
"private_key": mock_client_keys["privateKey"],
"private_key_pkcs8": mock_private_key_pkcs8.read(),
Expand Down

0 comments on commit eeb21ac

Please sign in to comment.