Remove metrics #4
This commit is contained in:
parent
d03e83dd66
commit
a0bc20aeb6
18 changed files with 8 additions and 633 deletions
23
app/user.js
23
app/user.js
|
@ -109,27 +109,8 @@ export default class User {
|
|||
async startAuthFlow(trigger, utms = {}) {
|
||||
this.utms = utms;
|
||||
this.trigger = trigger;
|
||||
try {
|
||||
const params = new URLSearchParams({
|
||||
entrypoint: `send-${trigger}`,
|
||||
form_type: 'email',
|
||||
utm_source: utms.source || 'send',
|
||||
utm_campaign: utms.campaign || 'none'
|
||||
});
|
||||
const res = await fetch(
|
||||
`${this.authConfig.issuer}/metrics-flow?${params.toString()}`,
|
||||
{
|
||||
mode: 'cors'
|
||||
}
|
||||
);
|
||||
const { flowId, flowBeginTime } = await res.json();
|
||||
this.flowId = flowId;
|
||||
this.flowBeginTime = flowBeginTime;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
this.flowId = null;
|
||||
this.flowBeginTime = null;
|
||||
}
|
||||
this.flowId = null;
|
||||
this.flowBeginTime = null;
|
||||
}
|
||||
|
||||
async login(email) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue