# org.neo4j.driver.v1.exceptions.AuthenticationException: Unsupported authentication token, scheme='none' only allowed when auth is disabled: { scheme='none' }

**URL:** <https://community.neo4j.com/t/org-neo4j-driver-v1-exceptions-authenticationexception-unsupported-authentication-token-scheme-none-only-allowed-when-auth-is-disabled-scheme-none/59629>\
**Category:** Ecosystem & Integrations\
**Tags:** migrated\
**Created:** [October 14, 2019, 1:24pm UTC](https://community.neo4j.com/t/org-neo4j-driver-v1-exceptions-authenticationexception-unsupported-authentication-token-scheme-none-only-allowed-when-auth-is-disabled-scheme-none/59629 "2019-10-14T13:24:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitaksh\_gupta](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/mitaksh_gupta/32/4592_2.png) [@mitaksh\_gupta](https://community.neo4j.com/u/mitaksh_gupta)\
**Post date:** [October 14, 2019, 1:24pm UTC](https://community.neo4j.com/t/org-neo4j-driver-v1-exceptions-authenticationexception-unsupported-authentication-token-scheme-none-only-allowed-when-auth-is-disabled-scheme-none/59629/1 "2019-10-14T13:24:56Z")

</div>

Hi,

I am trying to connect to Neo4j from Spark using neo4j-spark-connector. I am facing an authentication issue when I try to connect to the Neo4j "org.neo4j.driver.v1.exceptions.AuthenticationException: Unsupported authentication token, scheme='none' only allowed when auth is disabled: { scheme='none' }" I have checked and the credentials I am passing are correct. Not sure why is it failing now.

```auto
import org.neo4j.spark._
import org.apache.spark._
import org.graphframes._
import org.apache.spark.sql.SparkSession
import org.neo4j.driver.v1.GraphDatabase
import org.neo4j.driver.v1.AuthTokens

val config = new SparkConf()

config.set(Neo4jConfig.prefix + "url", "bolt://localhost")
config.set(Neo4jConfig.prefix + "user", "neo4j")
config.set(Neo4jConfig.prefix + "password", "root")

val sparkSession :SparkSession = SparkSession.builder.config(config).getOrCreate()

val neo = Neo4j(sparkSession.sparkContext)

val graphFrame = neo.pattern(("Person","id"),("KNOWS","null"), ("Employee","id")).partitions(3).rows(1000).loadGraphFrame

println(" **********Graphframe Vertices Count************")
graphFrame.vertices.count

println(" **********Graphframe Edges Count************")
graphFrame.edges.count

val pageRankFrame = graphFrame.pageRank.maxIter(5).run()
val ranked = pageRankFrame.vertices
ranked.printSchema()

val top3 = ranked.orderBy(ranked.col("pagerank").desc).take(3)

```

Can someone please have a look and let me know the reason for the same?

---

<div class="post-metadata">

**Author:** ![ohmygaugh](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ohmygaugh/32/11397_2.png) [@ohmygaugh](https://community.neo4j.com/u/ohmygaugh)\
**Post date:** [September 28, 2022, 12:33pm UTC](https://community.neo4j.com/t/org-neo4j-driver-v1-exceptions-authenticationexception-unsupported-authentication-token-scheme-none-only-allowed-when-auth-is-disabled-scheme-none/59629/2 "2022-09-28T12:33:32Z")

</div>

Did you figure this out?

---

<div class="post-metadata">

**Author:** ![bajajpavitra99](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/bajajpavitra99/32/28445_2.png) [@bajajpavitra99](https://community.neo4j.com/u/bajajpavitra99)\
**Post date:** [April 20, 2023, 9:08pm UTC](https://community.neo4j.com/t/org-neo4j-driver-v1-exceptions-authenticationexception-unsupported-authentication-token-scheme-none-only-allowed-when-auth-is-disabled-scheme-none/59629/3 "2023-04-20T21:08:49Z")

</div>

Did you figured out why it was not connecting?
