SS_ID and passcode secrets.h

#include "arduino_secrets.h"
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS;
Is there a way to load these varibles from an uSD card!
I have sd card code.>

type or paste code here
void dgetid(){
  //while (!Serial) {
  //  ; // wait for serial port to connect. Needed for native USB port only
 // }
  Serial.println("Initializing SD card...");
  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    while (1);
  }
  Serial.println("initialization done.");
  // ropen the file for reading:
  myFile = SD.open("secrets.txt");
  if (myFile) {
    Serial.println("secrets.txt:");

    // read from the file until there's nothing else in it:
    while (myFile.available()) {
      Serial.write(myFile.read());
      
    }
    Serial.println(":");
    Serial.println("close the file");
    myFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening secrets.txt");
  }
}

Yes, but also look at WiFiManager.

This library(WiFimanager) is compatible with the esp8266, esp32 architectures.

I'm using MKR1010. So I'd have to switch HW! dump investment.
Thanks anyway