> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationLoginWithOpenIdConnectAsync

> 使用由游戏与 Open ID Connect 提供商之间的现有关系创建的 Open ID Connect JWT 为用户登录。

使用由游戏与 Open ID Connect 提供商之间的现有关系创建的 Open ID Connect JWT 为用户登录。

## 语法

```cpp theme={null}
HRESULT PFAuthenticationLoginWithOpenIdConnectAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithOpenIdConnectRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`serviceConfigHandle`**   PFServiceConfigHandle

从 PFServiceConfigCreateHandle 调用返回的 PFServiceConfigHandle。

**`request`**   [PFAuthenticationLoginWithOpenIdConnectRequest\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithopenidconnectrequest)

已填充的请求对象。

**`async`**   XAsyncBlock\*<br />*Inout*

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在所有平台上使用。另请参阅 ClientLinkOpenIdConnectAsync、ClientUnlinkOpenIdConnectAsync。异步任务完成后，调用 [PFAuthenticationLoginWithOpenIdConnectGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithopenidconnectgetresult) 获取结果。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

[PFAuthentication 成员](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationLoginWithOpenIdConnectGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithopenidconnectgetresultsize.md)
- [PFAuthenticationLoginWithOpenIdConnectGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithopenidconnectgetresult.md)
- [服务 C API 概览 - PFAuthentication.h](/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationReLoginWithOpenIdConnectAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithopenidconnectasync.md)
- [PFAuthenticationLoginWithOpenIdConnectRequest](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithopenidconnectrequest.md)
