Question: Sorry no code here because I am looking for a better idea or if I am on the right track?

I have two websites, lets call them A and B.

A is a website exposed to the internet and only users with valid account can access.

B is a internal (intranet) website with (Windows authentication using Active directory). I want Application B (intranet) to create users for Application A.

Application A is using the inbuilt ASP.NET JWT token authentication.

My idea is to expose a Api on the extranet website (A) and let (B) access this API. I can use CORS to make sure only (B) has access to the end point but I am not sure if this is a good enough protection? We will perform security penetrations test from a third party company so this might fail the security test?

Or

I can use entity framework to a update the AspnetUsers table manually. Not idea if this is feasible or the right way or doing things.

Any other solution?

Answer: 
Code :

```js
button = document.getElementById("btn")
label = document.getElementById("lbl")

button.addEventListener('dblclick', function(){
  label.style.display = 'none';
})
```

```html
<button id="btn">Button</button>
<label  id="lbl">lbl</label>
```
It's divided to 3 steps:

1. Set the counter to count the clicks.
2. Add the click listener on button and increment the counter by 1 on click.
3. If the counter reaches 2, modify the CSS of label with `display: none` to make it disappear

Here's the pure Javascript solution:

```js
var lbl = document.getElementById('lbl');
var btn = document.getElementById('btn');
var clicks = 0;

btn.addEventListener('click', (e) => {
  clicks++;
  if (clicks === 2) lbl.style.display = 'none';
});
```

```html
<button id="btn">Button</button>
<label  id="lbl">lbl</label>
```