Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix for login #90

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ private CredentialAccount convertAccount2CredentialAccount(Account a) {
}

@GetMapping("/oauth/authorize")
public String getOauthAuthorize() {
public String getOauthAuthorize(@RequestParam String client_id, @RequestParam String redirect_uri) {
// resolves locale to user locale; resolves the locale based on the "Accept-Language" header in the
// request packet. resolved via the WebFilterChain.
return templateEngine.process("authorize", new Context(LocaleContextHolder.getLocale()));
Context context = new Context(LocaleContextHolder.getLocale());
context.setVariable("clientId", client_id);
context.setVariable("redirectUri", redirect_uri);
return templateEngine.process("authorize", context);
}

@GetMapping("/oauth/login")
Expand Down
4 changes: 2 additions & 2 deletions server/src/main/resources/static/oauth/authorize.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ <h2 th:text="#{authorizeError}">authError</h2>
<span th:text="#{password}">Password</span>
<br/>
<input name="password" type="password"/><br/>
<input name="client_id" type="hidden" value="client_id_value"/>
<input name="redirect_uri" type="hidden" value="redirect_uri_value"/>
<input th:value="${clientId}" name="client_id" type="hidden" value="client_id_value"/>
<input th:value="${redirectUri}" name="redirect_uri" type="hidden" value="redirect_uri_value"/>
<input type="submit" value="#{signIn}" th:value="#{signIn}"/>
</form>
</body>
Expand Down
Loading