Skip to content

Commit

Permalink
Merge pull request #160 from ZeusWPI/fix/absolute-authorize-url
Browse files Browse the repository at this point in the history
Use absolute path to authorize post URL
  • Loading branch information
rien authored Oct 23, 2021
2 parents 6d2591a + ff5f955 commit 2a9b698
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/controllers/oauth_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ pub async fn authorize<'r>(
cookies.add_private(state.into_cookie()?);
Ok(template! {
"oauth/authorize.html";
authorize_post_url: String = uri!(do_authorize).to_string(),
client_name: String = client_name,
})
} else {
Expand Down
2 changes: 1 addition & 1 deletion templates/oauth/authorize.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>

<!-- Form -->
<form class="is-flex" action="authorize" method="post">
<form class="is-flex" action="{{ authorize_post_url }}" method="post">
<button class="button is-success is-medium" type="submit" name="authorized" value="true">Yes</button>
<button class="button is-danger is-medium ml-2" type="submit" name="authorized" value="false">No</button>
</form>
Expand Down

0 comments on commit 2a9b698

Please sign in to comment.