# Upgrade 1.7 -> 1.8

{% hint style="success" %}
No major API breaking changes introduced.
{% endhint %}

## Coherence Cloud Login

As part of 1.8, there's a new component called **CoherenceCloudLogin** that is now the recommended no-code method for [logging in to coherence Cloud](https://docs.coherence.io/hosting/coherence-cloud/authentication-service-player-accounts) - as a Guest, or otherwise.

<figure><img src="https://content.gitbook.com/content/CMCtKgV0bk1lwR4tWK3W/blobs/oliOLQ8ZH2HOtuGTunw7/image.png" alt=""><figcaption></figcaption></figure>

CoherenceBridge will for now also retains its *Auto Login In As Guest* functionality, however, starting now, it is recommended to start using CoherenceCloudLogin (or the [CoherenceCloud API](https://unityapi.coherence.io/docs/v1.8.0/api/Coherence.Cloud.CoherenceCloud.html) directly) instead.

### **Old way to access cloud services**

In older versions Cloud Services would often be accessed via *CoherenceBridge.CloudService*.

```csharp
[SerializeField] CoherenceBridge bridge;

IEnumerator Start()
{
	while (!bridge.CloudService.IsLoggedIn)
	{
		yield return null;
	}

	// Access cloud services:
	var cloudService = bridge.CloudService;
}
```

### **Recommended ways to access cloud services**

In 1.8 and later it's preferable to access cloud services via *CoherenceCloudLogin.Services* instead.

```csharp
[SerializeField] CoherenceCloudLogin cloudLogin;

IEnumerator Start()
{
	while (!cloudLogin.IsLoggedIn)
	{
		yield return null;
	}

	// Access cloud services:
	var cloudService = cloudLogin.Services;
}
```

You can also disable *Log In On Load* on the CoherenceCloudLogin component, and trigger the log in operation manually whenever you're ready using the *LogInAsync* method.

The *LogInAsync* method is [idempotent](https://en.wikipedia.org/wiki/Idempotence), meaning that even if it is executed multiple times, the CoherenceCloudLogin component will still only log into a single PlayerAccount.

```csharp
[SerializeField] CoherenceCloudLogin cloudLogin;

async Awaitable Start()
{
	PlayerAccount playerAccount = await cloudLogin.LogInAsync()

	// Access cloud services:
	var cloudService = playerAccount.Services;
}
```

Alternatively, you can also use *PlayerAccount.GetMainAsync* to acquire a reference to the **Main Player Account** and gain access to its cloud services that way.

This can be useful when your component exist in a different scene or prefab than the CoherenceCloudLogin component.

{% hint style="info" %}
The first Player Account that you log into becomes the **Main Player Account** by default.
{% endhint %}

```csharp
async Awaitable Start()
{
	PlayerAccount playerAccount = await PlayerAccount.GetMainAsync();

	// Access cloud services:
	var cloudService = playerAccount.Services;
}
```

Read more about [CoherenceCloudLogin](https://docs.coherence.io/manual/components/coherence-cloud-login).

{% hint style="info" %}
If you experience issues upgrading, please reach to us on [Discord](https://coherence.io/discord).
{% endhint %}
