私はAqueductを初めて使用しており、/auth/token
または/auth/code
ルートにリクエストしようとすると無効なクライアントエラーが発生しています。 私は既にOAuth2.0クライアントを追加し、秘密が正しいことを確認しました。 /auth/token
への私の要求は次のようになります。水道局のdb_and_auth/wildfireの無効なクライアントの例
Future main() async {
var http2 = new http.Client();
var clientID = "com.wildfire.mobile";
var clientSecret = "myspecialsecret ";
var body = "username=usr&password=pwd&grant_type=password";
var clientCredentials = new Base64Encoder().convert(
"$clientID:$clientSecret".codeUnits);
var response = await
http.post(
"http://localhost:8081/auth/token",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Basic $clientCredentials"
},
body: body);
そして、私は_userデータベースにユーザ名と/auth/code
にログインしようとすると、サーバーは、それが実際に設定ミスの問題だった400:invalid_client
確認するべきこと:設定ファイルが正しいデータベースを指していますか? aqueduct auth CLIを使用してクライアントIDとシークレットを追加しましたか?また、ここに水引のためのスラックチャンネルがあります:http://aqueductsignup.herokuapp.com –