---
title: Credential.type
slug: Web/API/Credential/type
tags:
  - API
  - Credential
  - Credential Management API
  - Property
  - Reference
  - credential management
browser-compat: api.Credential.type
---
{{SeeCompatTable}}{{APIRef("Credential Management API")}}

The **`type`** property of the
{{domxref("Credential")}} interface returns a {{domxref("DOMString")}} containing the
credential's type. Valid values are `password`, `federated` and
`public-key`.

## Syntax

```js
var credType = Credential.type;
```

### Value

A {{domxref("DOMString")}} contains a credential's given name.

## Example

```js
// TBD
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
