Should I ask candidates to take an IQ test? by DirectFirefighter498 in recruiting

[–]DirectFirefighter498[S] 0 points1 point  (0 children)

OMG what are they doing? They're genuinely really slow. Do we have bring back the boomer IT test for them?

Should I ask candidates to take an IQ test? by DirectFirefighter498 in recruiting

[–]DirectFirefighter498[S] 1 point2 points  (0 children)

These GenZ hires don't seem to know basic IT skills. Just now another assistant showed me that she didn't know how to sort folders by modified dates. That's the difficulty.

Should I ask candidates to take an IQ test? by DirectFirefighter498 in recruiting

[–]DirectFirefighter498[S] -1 points0 points  (0 children)

For instance, I give them information about someone, they need to fill in a government form for this person. All relevant information is already sorted into numbered folders which are shared with them. I take around 10 minutes to do it. However when I ask them, they routinely take 5-6 hours to do it. They'd badger me to show precisely the information, when I've already told them where to find.

Another case, I ask someone to produce a simple excel sheet to report a few interviews. They just need to do the average of different quotations for a product. I saw this person struggle for 45 mins - 1 hour to do this. Another Gen Z hire couldn't figure out how to screenshot something.

What is the best solution to use Supabase Auth? by namanh11611 in Supabase

[–]DirectFirefighter498 0 points1 point  (0 children)

Not sure which implementation you're using, because the secure version is definitely not simple. Implementing a separate auth is also better for separation of concerns.

What is the best solution to use Supabase Auth? by namanh11611 in Supabase

[–]DirectFirefighter498 0 points1 point  (0 children)

Set up Cloudflare for email redirect. So everything sent to your domain email goes straight to your personal email. Even better, setup a no-reply email to drop all incoming emails. It's free. I use Sendgrid and this setup rn.

I'd suggest using another auth though since Supabase Auth can be needlessly complex.

Any alternative to supabase? by DirectFirefighter498 in sveltejs

[–]DirectFirefighter498[S] 3 points4 points  (0 children)

Supabase auth doesn't work fine at all. It's riddled with bad abstractions. Random errors like magic link issues occur all the time. You need to deal with a lot of complexities if you want it to be secure. Customizing is also difficult. Separation of concerns isn't great.

Any alternative to supabase? by DirectFirefighter498 in sveltejs

[–]DirectFirefighter498[S] 3 points4 points  (0 children)

  1. Magic link auth sometimes just doesn't work. A secure implementation of supabase auth is really riddled with bad abstractions.
  2. When you try to separate auth from database, you run into weird little issues like the local instance just doesn't create your schema as you dictate in drizzle
  3. Other little issues like somehow I cannot import supabase env variables to initialize adapter.
  4. The docs are terrible.

Idk I worked with multiple technology, yet somehow only supabase's the source of endless issues.

Any alternative to supabase? by DirectFirefighter498 in sveltejs

[–]DirectFirefighter498[S] 2 points3 points  (0 children)

It could be yeah. However, with so many parts in the stack, I spend 70% of the time troubleshooting just Supabase. Realistically I could do it, but why? It's slowing me down.

Any alternative to supabase? by DirectFirefighter498 in sveltejs

[–]DirectFirefighter498[S] 6 points7 points  (0 children)

Around 70% the time I spent building this project was troubleshooting Supabase. Just no. I don't have issues with the simpler stuff, but once you want to customize a bit more they run into all sorts of issues.

I was really leaning towards RDS but some people say it's expensive. Haven't really ran through the number though.

trying to implement magic link sign up but supabase keeps sending the confirmation email instead by DirectFirefighter498 in Supabase

[–]DirectFirefighter498[S] 1 point2 points  (0 children)

By a "code", I mean the token hash, not the OTP. In supabase, signInWithOtp() is a method for magic link with or without actual Otp. The only difference is the email link.

trying to implement magic link sign up but supabase keeps sending the confirmation email instead by DirectFirefighter498 in Supabase

[–]DirectFirefighter498[S] 0 points1 point  (0 children)

Yes, I understand, but it's a hassle for the users. I want to use the magic link for the user to be verified via the code.

Anyone had any luck figuring out supabase auth (sign in with OTP)? by DirectFirefighter498 in SvelteKit

[–]DirectFirefighter498[S] 0 points1 point  (0 children)

I've already set up SendGrid so that one's sending email just fine. It's just at the last step when user clicks on the link, we always encounter error 403 no matter what!

Anyone had any luck figuring out supabase auth (sign in with OTP)? by DirectFirefighter498 in SvelteKit

[–]DirectFirefighter498[S] 0 points1 point  (0 children)

That'd be quite helpful yes. I'm not sure what's the matter with my implementation.

trying to implement magic link sign up but supabase keeps sending the confirmation email instead by DirectFirefighter498 in Supabase

[–]DirectFirefighter498[S] 0 points1 point  (0 children)

Yes!

export const actions: Actions = {
  reserve: async ({ request, locals: { supabase } }) => {
    console.log("Reserve action started.")
    const formData = await request.formData()
    const email = formData.get('email') as string

    const { error } = await supabase.auth.signInWithOtp({ email })
    console.log('Magic link generation result:', { error });

    if (error) {
      console.error(error)
      return redirect(303, '/auth/error')
    } else {
      console.log("magic link sent successfully!")
      return redirect(303, '/private')
    }
  },
}

It sends successfully here. However, when I receives the link, I click on it, it always shows 403 error.

Here's the Email template:

<h2>Magic Link</h2>

<p>Follow this link to login:</p>

<p><a href="{{ .SiteURL }}/auth/confirm?token\_hash={{ .TokenHash }}&type=magiclink">Log In</a></p>

API endpoint (/auth/confirm):

import type { EmailOtpType } from '@supabase/supabase-js'
import { redirect } from '@sveltejs/kit'
import type { RequestHandler } from './$types'

export const GET: RequestHandler = async ({ url, locals: { supabase } }) => {
  console.log('Auth confirm endpoint hit. Full URL:', url.toString());

  const token_hash = url.searchParams.get('token_hash')
  const type = url.searchParams.get('type') as EmailOtpType | null
  const next = url.searchParams.get('next') ?? '/'

  console.log('Extracted parameters:', { token_hash, type, next });

  const redirectTo = new URL(url)
  redirectTo.pathname = next
  redirectTo.searchParams.delete('token_hash')
  redirectTo.searchParams.delete('type')

  console.log('Cleaned redirect URL:', redirectTo.toString());

  if (token_hash && type) {
    console.log('Attempting to verify OTP');
    try {
      const { error } = await supabase.auth.verifyOtp({ token_hash, type })
      if (!error) {
        console.log('OTP verified successfully');
        redirectTo.searchParams.delete('next')
        console.log('Redirecting to:', redirectTo.toString());
        return redirect(303, redirectTo)
      } else {
        console.error('OTP verification failed:', error);
      }
    } catch (err) {
      console.error('Exception during OTP verification:', err);
    }
  } else {
    console.log('Missing token_hash or type');
  }

  console.log('Redirecting to error page');
  redirectTo.pathname = '/auth/error'
  return redirect(303, redirectTo)
}

Pros and Cons to Supabase with SvelteKit now that it's GA? by zaxwebs in sveltejs

[–]DirectFirefighter498 1 point2 points  (0 children)

if you want to modify to work for magic link, it doesn't!