Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ let authToken: AuthorizationToken;

// auth flow: response with URL to redirect to Medicare.gov beneficiary login
app.get("/api/authorize/authurl", (req: Request, res: Response) => {
res.send(bb.generateAuthorizeUrl(authData));
// for SMART App v2 scopes usage: explicitly
// provide query parameter scope=<v2 scopes>
// where <v2 scopes> is space delimited v2 scope specs (url encoded)
// e.g. patient/ExplanationOfBenefit.rs
const redirectUrl = bb.generateAuthorizeUrl(authData) +
"&scope=patient%2FExplanationOfBenefit.rs"
res.send(redirectUrl);
});

// auth flow: oauth2 call back
Expand Down