# 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/10988>\
**Category:** Ecosystem & Integrations\
**Tags:** neo4j-driver, spark\
**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/10988 "2019-10-14T13:24:56Z")\
**Posts on this page:** 2\
**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/10988/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:** ![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 16, 2019, 9:35am 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/10988/2 "2019-10-16T09:35:44Z")

</div>

Hi,

One of my deployments is stuck due to this issue. It will be great if someone can have a look at this issue.

Thanks
