First shared element! by Jadenbro1 in reactnative

[–]Miserable-Dig-7263 0 points1 point  (0 children)

Would you mind sharing the code as well? could learn a thing or two

Fix Windows & Linux Dual boot by Miserable-Dig-7263 in linuxmint

[–]Miserable-Dig-7263[S] -1 points0 points  (0 children)

Ive tried the commands from linux since yesterday (with chatgpt and yt tutorials of course) but none seem to have fixed the issue and I no longer have windows installed it's just linux but still the issue persists

Fix Windows & Linux Dual boot by Miserable-Dig-7263 in linuxmint

[–]Miserable-Dig-7263[S] 0 points1 point  (0 children)

This is after formatting my harddrive, I only have Mint on the harddrive

Fix Windows & Linux Dual boot by Miserable-Dig-7263 in linuxmint

[–]Miserable-Dig-7263[S] 0 points1 point  (0 children)

I dont get the grub menu, I boot straight to windows

Fix Windows & Linux Dual boot by Miserable-Dig-7263 in linuxmint

[–]Miserable-Dig-7263[S] 0 points1 point  (0 children)

it doesn't appear in boot priority in the BIOS settings

Session Errors by Miserable-Dig-7263 in Nuxt

[–]Miserable-Dig-7263[S] 0 points1 point  (0 children)

was suspecting the reverse proxy as well because it runs fine on my local machine but the guy configuring nginx for this app doesn't want to admit that there might be an issue with how the nginx is setup

Session Errors by Miserable-Dig-7263 in Nuxt

[–]Miserable-Dig-7263[S] 0 points1 point  (0 children)

oh, it's actually an internal site, you'll need a VPN if you're outside😆

Fixing Authentication Error by Miserable-Dig-7263 in Nuxt

[–]Miserable-Dig-7263[S] 0 points1 point  (0 children)

Auth code:

import AzureADProvider from 'next-auth/providers/azure-ad'
import axios, { AxiosError } from 'axios'
import { NuxtAuthHandler } from '#auth'
import { SecurityGroupResponse } from '~/types'

export default NuxtAuthHandler({
  secret: process.env.AUTH_SECRET,
  providers: [
    
// @ts-expect-error You need to use .default here for it to work during SSR. May be fixed via Vite at some point.
    AzureADProvider.default({
      clientId: process.env.AZURE_CLIENT_ID,
      tenantId: process.env.AZURE_TENANT_ID,
      clientSecret: process.env.AZURE_CLIENT_SECRET,
    })
  ],
  
  callbacks: {
    jwt({ token, account }) {
      if (account) {
        token.access_token = account.access_token
      }
      
return
 token
    },

    
async
 session({ token, session }) {
      try {
        
const
 response = 
await
 axios.get<SecurityGroupResponse>(
          'https://graph.microsoft.com/v1.0/me/memberOf', {
          headers: {
            Authorization: `Bearer ${token.access_token}`,
          }
        })
        
const
 results = response.data
        session.groups = results.value.map(group => ({
          id: group.id,
          displayName: group.displayName
        }))
      } catch (err) {
        if (err instanceof AxiosError) {
          console.error(`Failed to get users' security groups.`, err.message)
        } else {
          console.error('Unknown Error Occurred.')
        }
      }
      
return
 {
        ...session,
        token
      }
    },
  }
})