OAuth Utils
Using a built-in provider
import { Detail, LaunchProps } from "@raycast/api";
import { withAccessToken, getAccessToken, OAuthService } from "@raycast/utils";
const github = OAuthService.github({
scope: "notifications repo read:org read:user read:project",
});
function AuthorizedComponent(props: LaunchProps) {
const { token } = getAccessToken();
return <Detail markdown={`Access token: ${token}`} />;
}
export default withAccessToken(github)(AuthorizedComponent);Using your own client
Using onAuthorize to initialize an SDK or similar
onAuthorize to initialize an SDK or similarLast updated

