Skip to content

Commit ad4c421

Browse files
committed
Rename firebaseid to providerid
1 parent ef0a60b commit ad4c421

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

RequestTests.paw

6 Bytes
Binary file not shown.

src/SimpleToDoService/Common/PushNotificationScheduler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async System.Threading.Tasks.Task CreatePushNotification(Task task)
9999
headings = new { en = "Task notification" },
100100
content_available = true,
101101
mutable_content = true,
102-
filters = new[] { new { field = "tag", key = "user_id", relation = "=", value = repository.User(task.UserUuid).FirebaseId } },
102+
filters = new[] { new { field = "tag", key = "user_id", relation = "=", value = repository.User(task.UserUuid).ProviderId } },
103103
send_after = notificationDate.Value.ToString("yyyy-MM-dd HH:mm:ss 'GMT'zzzz")
104104
});
105105

src/SimpleToDoService/Controllers/UsersController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using Microsoft.AspNetCore.Authorization;
33
using Microsoft.AspNetCore.Mvc;
44
using SimpleToDoService.Middleware;
@@ -33,7 +33,7 @@ public async System.Threading.Tasks.Task<IActionResult> DeleteUser()
3333

3434
try
3535
{
36-
await Common.Auth0Client.DeleteUser(user.FirebaseId);
36+
await Common.Auth0Client.DeleteUser(user.ProviderId);
3737
}
3838
#if DEBUG
3939
catch (Exception ex)

src/SimpleToDoService/Database/Entities.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ public class User
1616
[Required]
1717
public Guid Uuid { get; set; }
1818

19-
[Column("firebaseid")]
19+
[Column("providerid")]
2020
[XmlIgnore]
2121
[JsonIgnore]
2222
[IgnoreDataMember]
23-
public string FirebaseId { get; set; }
23+
public string ProviderId { get; set; }
2424

2525
[MaxLength(255)]
2626
[Column("firstname")]

src/SimpleToDoService/Middleware/CheckUserMiddleware.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public async System.Threading.Tasks.Task Invoke(HttpContext context)
4242

4343
private Guid LoadUserGuid(HttpContext context)
4444
{
45-
var firebaseId = context.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value;
46-
var currentUser = repository.Users().Where(o => o.FirebaseId == firebaseId).FirstOrDefault();
45+
var providerId = context.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value;
46+
var currentUser = repository.Users().Where(o => o.ProviderId == providerId).FirstOrDefault();
4747

4848
if (currentUser != null)
4949
{
@@ -52,7 +52,7 @@ private Guid LoadUserGuid(HttpContext context)
5252

5353
var user = new User()
5454
{
55-
FirebaseId = firebaseId,
55+
ProviderId = providerId,
5656
Email = context.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Email).Value,
5757
FirstName = "",
5858
LastName = ""

0 commit comments

Comments
 (0)