Skip to content

Instantly share code, notes, and snippets.

View Phantom-KNA's full-sized avatar
🏠
Working from home

Phantom_KNA Phantom-KNA

🏠
Working from home
View GitHub Profile
@Phantom-KNA
Phantom-KNA / ExampleLogin.cs
Created September 19, 2023 21:21
WowCore Login SHA256
using System.Security.Cryptography;
using System.Text;
namespace YOURNAMESPACE
{
// Credits https://stackoverflow.com/users/5763027/bigelle
public class ExampleLogin {
//Console.WriteLine(DoShaHashPassword256(username, password));
@Phantom-KNA
Phantom-KNA / CustomSessionHandler.cs
Created August 30, 2023 15:44
Auth Explanation(Xamarin Forms, MAUI)
using Supabase.Gotrue.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Supabase.Gotrue;
using Newtonsoft.Json;
namespace YOURNAMESPACE
@Phantom-KNA
Phantom-KNA / MyImplementationGoogleOAuth.md
Last active March 24, 2024 02:59
OAuth(Google) + Supabase + Native Android(MAUI, Xamarin Forms, Xamarin Android)

First Check in Supabase Proyect

  • Double check to make sure Project Settings -> Auth -> Auth settings -> User Signups is turned ON.
After your Implementation with GoogleSignInClient or another, use the IdToken like this:

var identityToken = Encoding.UTF8.GetString(System.Text.Encoding.UTF8.GetBytes(GoogleIdToken), 0, GoogleIdToken.Length);

And finally use SignInWithIdToken for Login or Create New User:

var user = await Supabase.Auth.SignInWithIdToken(Supabase.Gotrue.Constants.Provider.Google, identityToken);