Add frontend /login/oauth

This commit is contained in:
Yang Luo
2021-03-20 11:34:04 +08:00
parent 9980ef1975
commit 80c47dd8c6
6 changed files with 82 additions and 27 deletions

View File

@ -247,15 +247,15 @@ class ApplicationEditPage extends React.Component {
{i18next.t("application:Face Preview")}:
</Col>
<Col span={22} >
<a style={{marginBottom: '10px'}} target="_blank" href={`/doors/${this.state.application.name}`}>
<a style={{marginBottom: '10px'}} target="_blank" href={`/login/oauth?client_id=${this.state.application.clientId}&response_type=code&redirect_uri=${this.state.application.redirectUris[0]}&scope=read&state=casdoor`}>
{
`${window.location.host}/doors/${this.state.application.name}`
`${window.location.host}/login/oauth?client_id=${this.state.application.clientId}&response_type=code&redirect_uri=${this.state.application.redirectUris[0]}&scope=read&state=casdoor`
}
</a>
<br/>
<br/>
<div style={{width: "500px", height: "600px", border: "1px solid rgb(217,217,217)"}}>
<Face application={this.state.application} />
<Face type={"login"} application={this.state.application} />
</div>
</Col>
</Row>