[{"id":"oauthoidcintermediate-001","courseId":"oauth-oidc-intermediate","domain":"authorization-flows","topic":"Implicit grant","prompt":"A single-page app uses the implicit grant. After the user approves, the authorization server redirects the browser back to the app. Where does the access token appear?","hint":"Think about what the browser's redirect carries and what it keeps local.","explain":"Some grants let the server hand tokens to the client through the browser redirect, skipping any second call. Consider which part of a URL stays with the browser and is never sent in the request.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.2","interaction":{"type":"single"},"options":[{"id":"a","text":"The fragment, the part after the # in the redirect URI","why":"The implicit grant returns the token in the fragment, which the browser does not send to the server."},{"id":"b","text":"The query string, the part after the ? in the redirect URI","whyNot":"The query string carries the code in the code flow; the implicit grant does not put the token there."},{"id":"c","text":"The body of a POST request sent to the redirect URI","whyNot":"The redirect is a browser navigation, so the token does not arrive in a POST body."},{"id":"d","text":"A Set-Cookie header on the redirect response","whyNot":"This grant does not deliver tokens as cookies; they come back inside the redirect URI."}],"answer":"a","explanation":"In the implicit grant the authorization server returns the access token in the fragment of the redirection URI, with no separate token request.","concept":"In the implicit grant the authorization server returns the access token in the fragment of the redirection URI, with no separate token request.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Implicit grant tokens come back in the redirect URI's fragment, not from a token endpoint call."]},{"id":"oauthoidcintermediate-002","courseId":"oauth-oidc-intermediate","domain":"authorization-flows","topic":"Password sharing before OAuth","prompt":"In the traditional password-sharing model, a resource owner can cut off one third-party app without affecting the others.","hint":"Think about what the owner would have to change to end one app's access, and who else that affects.","explain":"Sharing a password gives a third party the same reach as its owner. Consider what the owner must change to take back access from one party, and what else that change touches.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-1","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","whyNot":"Revoking one app means changing the shared password, which cuts off every app that holds it."},{"id":"b","text":"False","why":"The owner cannot revoke one third party alone; the only lever is the shared password, which affects all of them."}],"answer":"b","explanation":"The introduction says resource owners cannot revoke access to an individual third party without revoking access to all third parties, and must change the third party's password to do so.","concept":"The introduction says resource owners cannot revoke access to an individual third party without revoking access to all third parties, and must change the third party's password to do so.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Password sharing ties every third party to one secret, so revoking one means changing it for all."]},{"id":"oauthoidcintermediate-003","courseId":"oauth-oidc-intermediate","domain":"authorization-flows","topic":"Access token request with authorization code","prompt":"A client sent a redirect_uri in its authorization request. Which token request, made later with the code, is valid?","hint":"Compare the two requests the client sends for one login.","explain":"An authorization code is issued for one request, and the server has to tie the exchange back to that request. Consider which details from the first call the server must see again in the second.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.1.3","interaction":{"type":"single"},"options":[{"id":"a","text":"It includes redirect_uri with the same value as the authorization request","why":"When the authorization request included redirect_uri, the token request must include it too, with an identical value."},{"id":"b","text":"It leaves redirect_uri out, since the code already ties to the request","whyNot":"The server must ensure redirect_uri is present when the first request included it, so omitting it fails."},{"id":"c","text":"It sends any redirect_uri that is registered for the client","whyNot":"The value must match the one used in the authorization request, not just any registered value."},{"id":"d","text":"Only confidential clients need to send redirect_uri at all","whyNot":"The requirement depends on whether the first request included redirect_uri, not on the client type."}],"answer":"a","explanation":"The token request must repeat redirect_uri whenever the authorization request included it, and the two values must be identical.","concept":"The token request must repeat redirect_uri whenever the authorization request included it, and the two values must be identical.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["If the authorization request had redirect_uri, the token request must repeat it with an identical value."]},{"id":"oauthoidcintermediate-004","courseId":"oauth-oidc-intermediate","domain":"authorization-flows","topic":"Authorization endpoint error response","prompt":"An authorization server must report a failed authorization request. Which TWO statements about its error response are correct?","hint":"Think about what a server may do with a redirect it cannot trust.","explain":"An error reply normally travels back through a redirect that the browser follows. Think about when that channel can be trusted, and which kinds of server failure a redirect cannot carry at all.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2.1","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"If the redirect URI is invalid, the server must not redirect the browser to it","why":"A missing or invalid redirection URI means the server informs the owner and does not redirect automatically."},{"id":"b","text":"On denial, it adds error=access_denied to the query of the redirect URI","why":"A refused request is reported by adding the error parameter with access_denied to the redirect URI's query."},{"id":"c","text":"It returns an HTTP 500 status to the browser, so the client sees the failure","whyNot":"A 500 cannot be sent back through a redirect, which is why the spec defines a server_error code."},{"id":"d","text":"It generates its own state value, and the client must match it","whyNot":"The state value is the exact one the client sent, echoed back unchanged."},{"id":"e","text":"error_description must always be present so the client can show it","whyNot":"error_description is optional, so a server may leave it out."},{"id":"f","text":"It sends the error to the invalid URI with error=invalid_request for logs","whyNot":"The server must not automatically redirect to an invalid redirection URI, so this path is closed."}],"answer":"ab","explanation":"When the redirection URI is missing or invalid, the server must not redirect to it automatically; other failures are reported by adding error parameters to the redirect URI's query.","concept":"When the redirection URI is missing or invalid, the server must not redirect to it automatically; other failures are reported by adding error parameters to the redirect URI's query.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Never auto-redirect to an invalid redirect URI; report other failures as error parameters in the query."]},{"id":"oauthoidcintermediate-005","courseId":"oauth-oidc-intermediate","domain":"authorization-flows","topic":"Authorization endpoint error codes","prompt":"An authorization server is down for planned maintenance when a client's authorization request arrives. Which error code should it send back in the redirect?","hint":"Compare a refusal, a fault in the server, and a server that cannot serve for a while.","explain":"Failures at the authorization step return through the redirect as one short code from a fixed list. The list separates bad requests, refusals, unexpected faults, and temporary inability to serve.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2.1","interaction":{"type":"single"},"options":[{"id":"a","text":"server_error","whyNot":"server_error is for an unexpected fault, not for a planned outage the server knows about."},{"id":"b","text":"temporarily_unavailable","why":"It reports a temporary overload or maintenance; the spec defines it because a 503 status cannot travel through a redirect."},{"id":"c","text":"invalid_request","whyNot":"That code means the request was missing a parameter or otherwise malformed, which this request is not."},{"id":"d","text":"access_denied","whyNot":"access_denied means the owner or server refused the request, not that the server cannot handle it right now."}],"answer":"b","explanation":"The authorization server uses temporarily_unavailable when it cannot handle a request due to temporary overload or maintenance; server_error is for unexpected conditions.","concept":"The authorization server uses temporarily_unavailable when it cannot handle a request due to temporary overload or maintenance; server_error is for unexpected conditions.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Use temporarily_unavailable for overload or maintenance; server_error is for unexpected faults."]}]