connect

현재 사인-인 된 유저에 요청한 provider 와 연동 한다.
It connects to the currently requested provider for the currently signed-in user.


korean

요청한 Provider 로 로그인을 시도 한 뒤, 로그인에 성공하면 인증서버에 연동 요청을 보낸다.
해당 Provider 의 UserId 에 이미 매칭된 playerId 가 있을 경우 listener 의 result 에 CONFLICT_PLAYER 에러를 내려준다.
이 경우 listener 에 포함되어 있는 conflictPlayer 객체의 충돌 유저 정보를 가지고 유저에게 계정 선택을 위한 UI 를 구성 해야한다.
유저가 선택을 하면 선택된 유저 정보로 selectConflict() 를 호출해 주면 된다.

직접 UI 를 구성하지 않을 경우 showConflictSelection() 을 이용할 수 있다.
이 경우 selectConflict() 까지 진행되며 사인-인 완료된 결과까지 받을 수 있다.

연동이 완료되면 해당 상태를 앱 내 UI 에 갱신해 준다.

BLACKLIST 일 경우 SDK에서 제재 팝업을 띄우고 BLACKLIST 에러를 내려 준다.


result : 지원하지 않는 ProviderType (INVALID_PARAM) 이거나
Sign 이 진행중일 경우 (IN_PROGRESS) 실패가 될 수 있다.
SignIn 이 되지 않은 상태에서는 INVALID_SESSION 에러가 된다.
이미 연결되어있는 Provider 의 경우 INVALID_PARAM 에러가 되며
해당 Provider 에 대해 disconnect 를 먼저 호출 후 다시 connect 해야 한다.
연결을 시도한 Provider 가 이미 다른 playerId 에 연결되어 있을 경우 CONFLICT_PLAYER 가 되며
conflictPlayer 객체에 해당 충돌 유저 정보가 포함되어있다.

conflictPlayer : result 가 CONFLICT_PLAYER 일 경우 충돌 유저에 대한 정보 이다.
playerId 와 충돌난 ProviderInfo 의 정보만 포함되어있다.
playerToken 은 비어 있음.


english

After logging in with the requested provider, if it is successful, it sends an linking request to the authentication server.
If there is a playerId already linked to the UserId of the corresponding provider, a CONFLICT_PLAYER error is returned in the result of the listener.
In this case, you should configured an UI for account selection to the user with the conflict user information of the conflictPlayer object included in the listener.
When the user makes a selection, calls selectConflict () with the selected user information.

If you do not customize the UI, you can use showConflictSelection().
In this case, when the user selects it, it can proceed to selectConflict() and receive the result of the sign-in completed.

When the linking is completed, the corresponding state should be updated on the UI of the app.

In the case of BLACKLIST, SDK will show a restriction popup and issue a BLACKLIST error.

Parameters

providerType

ProviderType to request connect.
AUTO or GUEST causes an INVALID_PARAM error.

listener

onAuthV4Connect

result :If ProviderType is not supported (INVALID_PARAM)
or if the Sign-in is in progress (IN_PROGRESS), it may fail.
If sign-in fails, an INVALID_SESSION error is returned.
An INVALID_PARAM error will occur if the provider is already connected.
In this case, you must first call disconnect for the provider and then connect again.
CONFLICT_PLAYER is returned if the provider attempting to connect is already connected to another playerId
and the conflictPlayer object returned contains the corresponding conflict user information.
conflictPlayer : If result is CONFLICT_PLAYER, it contains information about the conflicting user.
Only the information of the ProviderInfo that conflicted with playerId is included.
playerToken is empty.