Example #1
0
        public async Task OnInit()
        {
            var accessToken = await _authService.GetAccessTokenAsync();

            if (accessToken is null)
            {
                var identity = _identityService.CreateDefaultIdentity();
                await _identityService.SignUpAsync(identity);

                var tokens = await _identityService.SignInAsync(identity);

                await _authService.SetAccessTokenAsync(tokens.AccessToken);

                await _customersService.CreateDefaultAsync();
            }
        }