0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Github と連携

Last updated at Posted at 2025-03-22

Auth Providersを作成。Consumer KeyとConsumer Secretを適度な文字列でよい

image.png

Callback URLをコピー

image.png

Github側で認証Appを作成

image.png

Authorization callback URLに↑でコピーしたURLを記入。Homepage URLにはHomeのURL

image.png

HomeのURLはアイコンをクリックしてユーザー名を確認、形式は「https://github.com/ユーザー名」

image.png

Consumer KeyとConsumer Secretを取得

image.png

Consumer KeyとConsumer SecretをSalesforce側へ再設定

image.png

指定ログイン情報を登録する

image.png

image.png

プロファイルで許可

image.png

image.png

個人設定で許可

image.png

注意:保存後、認証ページに移動される、その後、StautsがAuthenticatedになる

image.png

test code

HttpRequest req = new HttpRequest();
req.setEndpoint('callout:myGitNamed/user');
req.setMethod('GET');
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug(res.getBody());
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?